/* DTN Plugin Frontend CSS — Fully Responsive */

/* ══ Companies Directory ══ */
.dtn-directory-filters {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px;
}
.dtn-filter-select {
  height: 40px; border: 2px solid #E8ECF0; border-radius: 4px;
  padding: 0 14px; font-size: 13px; outline: none;
  transition: border-color .2s; min-width: 0; flex: 1 1 180px;
}
.dtn-filter-select:focus { border-color: #CC1F1F; }
.dtn-filter-btn {
  height: 40px; background: #CC1F1F; color: #fff;
  border: none; border-radius: 4px; padding: 0 20px;
  font-weight: 700; cursor: pointer; font-size: 13px;
  white-space: nowrap; flex-shrink: 0;
}
.dtn-filter-btn:hover { background: #A01515; }

/* ══ Company Profile Page ══ */
.dtn-company-profile {
  background: #fff; border-radius: 8px;
  padding: 28px; box-shadow: 0 2px 12px rgba(0,0,0,.1);
}
.dtn-company-profile__header {
  display: flex; align-items: flex-start;
  gap: 20px; margin-bottom: 24px; flex-wrap: wrap;
}
.dtn-company-profile__logo {
  width: 90px; height: 90px; border-radius: 8px;
  object-fit: contain; background: #F5F6F8; padding: 8px;
  flex-shrink: 0;
}
.dtn-company-profile__name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 32px; font-weight: 900; color: #0D1B2A;
}
.dtn-company-profile__meta {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 8px; font-size: 13px; color: #4A5568;
}
.dtn-company-profile__meta span { display: flex; align-items: center; gap: 5px; }

/* ══ Star Rating Input ══ */
.dtn-star-input { display: flex; gap: 4px; }
.dtn-star-input label { font-size: 28px; color: #E8ECF0; cursor: pointer; transition: color .15s; }
.dtn-star-input input { display: none; }
.dtn-star-input input:checked ~ label,
.dtn-star-input label:hover,
.dtn-star-input label:hover ~ label { color: #F5A623; }

/* ══ Compare Bar ══ */
.dtn-compare-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #0D1B2A; color: #fff;
  padding: 12px 20px;
  display: flex; align-items: center; gap: 14px;
  flex-wrap: wrap;
  z-index: 999;
  transform: translateY(100%); transition: transform .3s;
  box-shadow: 0 -4px 20px rgba(0,0,0,.3);
}
.dtn-compare-bar.active { transform: translateY(0); }
.dtn-compare-bar__title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px; font-weight: 700; white-space: nowrap;
}
.dtn-compare-bar__companies {
  display: flex; gap: 8px; flex: 1; flex-wrap: wrap;
}
.dtn-compare-bar__company {
  background: rgba(255,255,255,.1); border-radius: 4px;
  padding: 4px 10px; font-size: 12px;
  display: flex; align-items: center; gap: 6px;
}
.dtn-compare-bar__btn {
  background: #CC1F1F; color: #fff; border: none;
  padding: 8px 18px; border-radius: 4px;
  font-weight: 700; cursor: pointer; font-size: 13px;
  white-space: nowrap; flex-shrink: 0;
}

/* ══ Fuel Prices Full Page ══ */
.dtn-fuel-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.dtn-fuel-country-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.dtn-fuel-country-header {
  background: #0D1B2A; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.dtn-fuel-country-header h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px; font-weight: 800; color: #fff; margin: 0;
}

/* ══ Video Modal ══ */
#dtn-video-modal { position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 9999; display: none; align-items: center; justify-content: center; }
#dtn-video-modal.open { display: flex; }
.dtn-video-modal-inner { position: relative; width: 90%; max-width: 920px; }
.dtn-video-modal-close { position: absolute; top: -38px; right: 0; background: none; border: none; color: #fff; font-size: 30px; cursor: pointer; line-height: 1; }
.dtn-video-modal-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 8px; }
.dtn-video-modal-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ══ Newsletter Page ══ */
.dtn-nl-page-wrap { max-width: 680px; margin: 0 auto; }
.dtn-nl-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 16px 0; }

/* ══ Shortcode: fuel prices ══ */
.dtn-fuel-shortcode { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dtn-fuel-shortcode table { min-width: 320px; }

/* ══ Shortcode: company grid ══ */
.dtn-companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

/* ══ RESPONSIVE ══ */

/* 992px: tablet */
@media (max-width: 992px) {
  .dtn-compare-bar { padding: 10px 14px; }
  .dtn-compare-bar__title { font-size: 14px; }
  .dtn-compare-bar__companies { gap: 6px; }
  .dtn-fuel-page-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

/* 768px: mobile */
@media (max-width: 768px) {
  .dtn-company-profile { padding: 18px; }
  .dtn-company-profile__logo { width: 70px; height: 70px; }
  .dtn-company-profile__name { font-size: 24px; }
  .dtn-company-profile__meta { gap: 8px; font-size: 12px; }

  /* Compare bar: 2-row layout */
  .dtn-compare-bar {
    flex-direction: column; align-items: stretch;
    padding: 10px 14px; gap: 8px;
  }
  .dtn-compare-bar__companies { flex-wrap: wrap; gap: 6px; }
  .dtn-compare-bar__btn { text-align: center; padding: 10px; }

  .dtn-directory-filters { gap: 8px; }
  .dtn-filter-select { flex: 1 1 140px; height: 38px; font-size: 12px; }
  .dtn-filter-btn { height: 38px; padding: 0 14px; font-size: 12px; }

  .dtn-fuel-page-grid { grid-template-columns: 1fr; }

  .dtn-nl-cat-grid { grid-template-columns: 1fr 1fr; }

  /* Video modal: nearly full screen */
  .dtn-video-modal-inner { width: 96%; }
  .dtn-video-modal-close { font-size: 24px; top: -32px; }
}

/* 480px: small phones */
@media (max-width: 480px) {
  .dtn-company-profile { padding: 14px; }
  .dtn-company-profile__header { gap: 12px; }
  .dtn-company-profile__logo { width: 60px; height: 60px; }
  .dtn-company-profile__name { font-size: 20px; }

  .dtn-star-input label { font-size: 24px; }

  .dtn-compare-bar { padding: 10px 12px; }
  .dtn-compare-bar__company { font-size: 11px; padding: 3px 8px; }

  .dtn-nl-cat-grid { grid-template-columns: 1fr; }

  .dtn-fuel-country-header h3 { font-size: 15px; }
}
