/* ═══════════════════════════════════════════════════
   DTF DIRECTORY TAMIL NADU — v2.0
   Matches uploaded card design exactly +
   Top Rated Badge · Follow Gate · Dark Mode
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --red:         #E63946;
  --red-dk:      #C1121F;
  --gold:        #F4A923;
  --gold-light:  #FFF8E7;
  --gold-border: #F4C55A;
  --green:       #2E7D32;
  --green-light: #E8F5E9;
  --blue:        #1565C0;
  --blue-light:  #E3F2FD;
  --text:        #1A1A2E;
  --muted:       #6B7280;
  --border:      #E5E7EB;
  --bg:          #F4F6F8;
  --card-bg:     #FFFFFF;
  --radius:      16px;
  --font:        'Nunito', 'Segoe UI', 'Noto Sans Tamil', sans-serif;
  --shadow:      0 2px 16px rgba(0,0,0,0.08);
  --shadow-lg:   0 8px 36px rgba(0,0,0,0.14);
}

/* ── Directory wrapper ── */
.dtf-directory {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-family: var(--font);
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 0;
}

/* ══════════════════════════════════════
   CARD
══════════════════════════════════════ */
.dtf-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px 16px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s, transform 0.25s;
  overflow: visible;
}
.dtf-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.dtf-card--top {
  border-color: var(--gold-border);
  border-width: 1.5px;
}

/* ══════════════════════════════════════
   👑 TOP RATED BADGE
══════════════════════════════════════ */
.dtf-top-badge {
  position: absolute;
  top: -14px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #F4A923 0%, #E8820C 100%);
  color: #fff;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 5px 14px 5px 10px;
  border-radius: 20px;
  box-shadow: 0 3px 12px rgba(244,169,35,0.45);
  animation: badge-drop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
  z-index: 10;
}
.dtf-top-badge__crown { font-size: 14px; animation: crown-spin 2s ease-in-out infinite alternate; }
@keyframes badge-drop {
  from { top: -30px; opacity: 0; }
  to   { top: -14px; opacity: 1; }
}
@keyframes crown-spin {
  from { transform: rotate(-8deg); }
  to   { transform: rotate(8deg); }
}

/* ══════════════════════════════════════
   CARD HEADER — Logo + Name + Text
══════════════════════════════════════ */
.dtf-card__header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.dtf-logo-wrap {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--border);
}
.dtf-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dtf-logo-placeholder {
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font);
}
.dtf-card__info { flex: 1; min-width: 0; }
.dtf-company-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--red);
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}
.dtf-card__body-text {
  font-size: 13.5px;
  color: #374151;
  line-height: 1.65;
  margin: 0;
}

/* ══════════════════════════════════════
   STAR RATING — Static display row
══════════════════════════════════════ */
.dtf-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.dtf-stars-static { display: flex; gap: 1px; }
.dtf-star {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.15s;
}
.dtf-star.full  { color: var(--gold); }
.dtf-star.half  { color: var(--gold); opacity: 0.5; }
.dtf-star.empty { color: #D1D5DB; }
.dtf-avg-score  { font-size: 15px; font-weight: 800; color: var(--text); }
.dtf-review-count { font-size: 12px; color: var(--muted); }

/* ══════════════════════════════════════
   INTERACTIVE STAR RATING
══════════════════════════════════════ */
.dtf-rate-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 12px;
  background: #F9FAFB;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.dtf-rate-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
}
.dtf-stars-input { display: flex; gap: 2px; }
.dtf-istar {
  background: none;
  border: none;
  font-size: 24px;
  color: #D1D5DB;
  cursor: pointer;
  padding: 0 1px;
  line-height: 1;
  transition: color 0.12s, transform 0.12s;
  font-family: inherit;
}
.dtf-istar:hover,
.dtf-istar.hover,
.dtf-istar.active { color: var(--gold); transform: scale(1.25); }
.dtf-istar.active { transform: scale(1.1); }
.dtf-your-rating  { font-size: 12px; color: var(--green); font-weight: 700; margin-left: 6px; }

/* Shine on submit */
.dtf-stars-input.rated .dtf-istar.active {
  animation: star-shine 0.5s ease;
}
@keyframes star-shine {
  0%  { transform: scale(1.1); }
  50% { transform: scale(1.5); filter: brightness(1.5); }
  100%{ transform: scale(1.1); }
}

/* ══════════════════════════════════════
   🔥 FOLLOW + CONTACT BUTTONS
══════════════════════════════════════ */
.dtf-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

/* Follow Button — matches the fire-icon red button in the image */
.dtf-follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 3px 10px rgba(230,57,70,0.3);
}
.dtf-follow-btn:hover {
  background: var(--red-dk);
  transform: scale(1.04);
  box-shadow: 0 5px 16px rgba(230,57,70,0.4);
}
.dtf-follow-btn--active {
  background: var(--green);
  box-shadow: 0 3px 10px rgba(46,125,50,0.3);
}
.dtf-follow-btn--active:hover {
  background: #1B5E20;
  box-shadow: 0 5px 16px rgba(46,125,50,0.4);
}
.dtf-follow-icon { font-size: 16px; }
.dtf-follow-label { font-size: 14px; font-weight: 800; letter-spacing: 0.02em; }
.dtf-follow-pill {
  background: rgba(255,255,255,0.25);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 700;
}

/* Pop animation on follow */
.dtf-follow-btn.dtf-pop {
  animation: follow-pop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes follow-pop {
  0%  { transform: scale(1); }
  50% { transform: scale(1.18); }
  100%{ transform: scale(1); }
}

/* Contact Number Button — green like in the image */
.dtf-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  background: #2E7D32;
  color: #fff;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 3px 10px rgba(46,125,50,0.3);
  font-family: var(--font);
}
.dtf-contact-btn:hover {
  background: #1B5E20;
  color: #fff;
  transform: scale(1.03);
}

/* ══════════════════════════════════════
   INFO BOX — Machines / Capacity
══════════════════════════════════════ */
.dtf-info-box {
  background: #F9FAFB;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.dtf-info-line {
  font-size: 13.5px;
  color: #374151;
  line-height: 1.7;
}
.dtf-info-line strong { color: var(--text); font-weight: 700; }

/* ══════════════════════════════════════
   LOCATION + HIGHLIGHTS
══════════════════════════════════════ */
.dtf-location {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.dtf-highlights {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.dtf-highlights__label { color: var(--muted); font-weight: 600; }
.dtf-hl-tag {
  background: var(--blue-light);
  color: var(--blue);
  padding: 2px 9px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

/* ══════════════════════════════════════
   REGISTRATION GATE MODAL
══════════════════════════════════════ */
.dtf-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.2s ease;
}
@keyframes fade-in { from{opacity:0} to{opacity:1} }
.dtf-modal {
  background: #fff;
  border-radius: 20px;
  padding: 36px 32px 28px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  animation: modal-up 0.35s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
}
@keyframes modal-up {
  from { transform: translateY(40px) scale(0.9); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.dtf-modal__icon { font-size: 48px; margin-bottom: 14px; display: block; }
.dtf-modal__title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
  font-family: var(--font);
}
.dtf-modal__sub {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.6;
  font-family: var(--font);
}
.dtf-modal__btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.dtf-modal__btn-reg {
  background: var(--red);
  color: #fff;
  padding: 11px 28px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  font-family: var(--font);
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
}
.dtf-modal__btn-reg:hover { background: var(--red-dk); transform: scale(1.04); color:#fff; }
.dtf-modal__btn-login {
  background: #F3F4F6;
  color: var(--text);
  padding: 11px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  font-family: var(--font);
  transition: background 0.2s;
  display: inline-block;
}
.dtf-modal__btn-login:hover { background: #E5E7EB; color: var(--text); }
.dtf-modal__close {
  position: absolute;
  top: 14px; right: 16px;
  background: none; border: none;
  font-size: 20px; cursor: pointer;
  color: var(--muted); line-height: 1;
}
.dtf-modal__close:hover { color: var(--text); }

/* ══════════════════════════════════════
   TOAST NOTIFICATION
══════════════════════════════════════ */
#dtf-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1A1A2E;
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-family: var(--font);
  font-weight: 600;
  z-index: 99999;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
#dtf-toast.show { transform: translateX(-50%) translateY(0); }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 600px) {
  .dtf-card { padding: 16px; }
  .dtf-logo-wrap { width: 58px; height: 58px; }
  .dtf-company-name { font-size: 16px; }
  .dtf-actions-row { gap: 8px; }
  .dtf-follow-btn, .dtf-contact-btn { font-size: 12px; padding: 8px 14px; }
  .dtf-top-badge { font-size: 10px; right: 14px; }
}

/* ══════════════════════════════════════
   DARK MODE
══════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
  :root {
    --card-bg: #1E1E2E;
    --text:    #F0F0F5;
    --muted:   #9CA3AF;
    --border:  #2D2D40;
    --bg:      #16161E;
    --blue-light: rgba(21,101,192,0.2);
    --green-light: rgba(46,125,50,0.2);
  }
  .dtf-rate-row, .dtf-info-box { background: #252535; border-color: #2D2D40; }
  .dtf-card__body-text, .dtf-info-line { color: #D1D5DB; }
  .dtf-modal { background: #1E1E2E; }
  .dtf-modal__btn-login { background: #2D2D40; color: #F0F0F5; }
  .dtf-modal__btn-login:hover { background: #3D3D50; }
}
