/* ============================================================
   Mini Affiliate Tools — Shared CSS
   Mobile-first, lightweight, no external dependencies
   ============================================================ */

:root {
  --mt-bg: #ffffff;
  --mt-text: #333333;
  --mt-heading: #1a1a1a;
  --mt-accent: #2B6CB0;
  --mt-accent-hover: #1a5390;
  --mt-border: #e0e0e0;
  --mt-card-bg: #fafafa;
  --mt-result-bg: #f0f7ff;
  --mt-result-border: #b8d4f0;
  --mt-error-bg: #fff0f0;
  --mt-error-border: #f0b8b8;
  --mt-success-bg: #f0fff0;
  --mt-success-border: #b8f0b8;
  --mt-budget-color: #4a9e4a;
  --mt-value-color: #2B6CB0;
  --mt-premium-color: #8B6914;
  --mt-radius: 12px;
  --mt-radius-sm: 8px;
  --mt-shadow: 0 2px 12px rgba(0,0,0,0.06);
  --mt-shadow-hover: 0 6px 20px rgba(0,0,0,0.1);
}

/* ============ TOOL CONTAINER ============ */
.mt-tool {
  max-width: 860px;
  margin: 0 auto 2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--mt-text);
  line-height: 1.6;
}

.mt-tool *,
.mt-tool *::before,
.mt-tool *::after {
  box-sizing: border-box;
}

/* ============ INTRO ============ */
.mt-intro {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 1.5rem;
}

/* ============ TOOL BOX ============ */
.mt-box {
  background: var(--mt-bg);
  border-radius: var(--mt-radius);
  box-shadow: var(--mt-shadow);
  padding: clamp(1rem, 4vw, 2rem);
  margin-bottom: 1.5rem;
  border: 1px solid var(--mt-border);
}

.mt-box-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--mt-heading);
}

/* ============ FORM ELEMENTS ============ */
.mt-field {
  margin-bottom: 1rem;
}

.mt-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--mt-heading);
}

.mt-select,
.mt-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 1rem;
  border: 1.5px solid var(--mt-border);
  border-radius: var(--mt-radius-sm);
  background: #fff;
  color: var(--mt-text);
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.mt-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.2rem;
}

.mt-select:focus,
.mt-input:focus {
  outline: none;
  border-color: var(--mt-accent);
  box-shadow: 0 0 0 3px rgba(43,108,176,0.12);
}

.mt-select:hover {
  border-color: #bbb;
}

/* ============ BUTTONS ============ */
.mt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--mt-radius-sm);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
  width: 100%;
}

.mt-btn-primary {
  background: var(--mt-accent);
  color: #fff;
}

.mt-btn-primary:hover {
  background: var(--mt-accent-hover);
}

.mt-btn-primary:active {
  transform: scale(0.98);
}

.mt-btn-affiliate {
  display: inline-block;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--mt-radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
  background: var(--mt-accent);
  color: #fff;
}

.mt-btn-affiliate:hover {
  background: var(--mt-accent-hover);
  color: #fff;
  text-decoration: none;
}

.mt-btn-affiliate.mt-budget {
  background: var(--mt-budget-color);
}
.mt-btn-affiliate.mt-budget:hover {
  background: #3d8a3d;
}

.mt-btn-affiliate.mt-value {
  background: var(--mt-value-color);
}
.mt-btn-affiliate.mt-value:hover {
  background: #1f5294;
}

.mt-btn-affiliate.mt-premium {
  background: var(--mt-premium-color);
}
.mt-btn-affiliate.mt-premium:hover {
  background: #6b5210;
}

/* ============ RESULT BOX ============ */
.mt-result {
  background: var(--mt-result-bg);
  border: 1.5px solid var(--mt-result-border);
  border-radius: var(--mt-radius);
  padding: clamp(1rem, 4vw, 1.5rem);
  margin-bottom: 1.5rem;
  display: none;
}

.mt-result.visible {
  display: block;
}

.mt-result-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--mt-accent);
}

.mt-result-text {
  font-size: 1rem;
  line-height: 1.6;
}

.mt-result-text p {
  margin: 0 0 0.5rem;
}

.mt-result-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.mt-result-list li {
  padding: 0.35rem 0;
  padding-left: 1.2rem;
  position: relative;
}

.mt-result-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--mt-accent);
  font-weight: 700;
}

/* ============ ERROR BOX ============ */
.mt-error-msg {
  background: var(--mt-error-bg);
  border: 1.5px solid var(--mt-error-border);
  border-radius: var(--mt-radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  color: #c00;
  font-size: 0.9rem;
  display: none;
}

.mt-error-msg.visible {
  display: block;
}

/* ============ PRODUCT CARDS ============ */
.mt-products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 600px) {
  .mt-products {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mt-product-card {
  background: var(--mt-bg);
  border-radius: var(--mt-radius);
  box-shadow: var(--mt-shadow);
  padding: 1.25rem;
  border: 1px solid var(--mt-border);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, transform 0.2s;
}

.mt-product-card:hover {
  box-shadow: var(--mt-shadow-hover);
  transform: translateY(-2px);
}

.mt-product-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  align-self: flex-start;
}

.mt-product-badge.mt-budget {
  background: #e8f5e8;
  color: var(--mt-budget-color);
}

.mt-product-badge.mt-value {
  background: #e8f0fa;
  color: var(--mt-value-color);
}

.mt-product-badge.mt-premium {
  background: #fdf3d0;
  color: var(--mt-premium-color);
}

.mt-product-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--mt-heading);
}

.mt-product-desc {
  font-size: 0.85rem;
  color: #666;
  margin: 0 0 0.75rem;
  flex: 1;
}

/* ============ EXPLANATION SECTION ============ */
.mt-explanation {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.mt-explanation h3 {
  font-size: 1.05rem;
  color: var(--mt-heading);
  margin: 1.25rem 0 0.5rem;
}

/* ============ FAQ ============ */
.mt-faq {
  margin-bottom: 1.5rem;
}

.mt-faq-item {
  border: 1px solid var(--mt-border);
  border-radius: var(--mt-radius-sm);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.mt-faq-q {
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--mt-heading);
  background: var(--mt-card-bg);
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.mt-faq-q::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: #999;
  transition: transform 0.2s;
}

.mt-faq-item.open .mt-faq-q::after {
  content: "−";
  transform: rotate(180deg);
}

.mt-faq-a {
  padding: 0 1rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.6;
}

.mt-faq-item.open .mt-faq-a {
  max-height: 300px;
  padding: 0.5rem 1rem 1rem;
}

/* ============ AFFILIATE DISCLAIMER ============ */
.mt-disclaimer {
  font-size: 0.8rem;
  color: #999;
  font-style: italic;
  padding: 0.75rem 1rem;
  background: var(--mt-card-bg);
  border-radius: var(--mt-radius-sm);
  margin-bottom: 1.5rem;
}

/* ============ AD PLACEHOLDERS ============ */
.mt-ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  background: repeating-linear-gradient(
    45deg,
    #f9f9f9,
    #f9f9f9 10px,
    #f0f0f0 10px,
    #f0f0f0 20px
  );
  border: 2px dashed #ddd;
  border-radius: var(--mt-radius-sm);
  margin-bottom: 1.5rem;
  color: #bbb;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  user-select: none;
}

/* ============ INTERNAL LINKS ============ */
.mt-related {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.mt-related a {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  background: var(--mt-card-bg);
  border: 1px solid var(--mt-border);
  border-radius: 20px;
  color: var(--mt-accent);
  text-decoration: none;
  transition: background 0.2s;
}

.mt-related a:hover {
  background: #e8f0fa;
  text-decoration: none;
}

/* ============ PRINT FRIENDLY ============ */
@media print {
  .mt-ad-placeholder,
  .mt-btn-affiliate,
  .mt-products,
  .mt-disclaimer {
    display: none;
  }
}
