/*
Theme Name: Astra Child for Snapiai
Template: astra
Version: 2.0.1
Description: Child theme carrying Snapiai tool enhancements — viewsnapstories-inspired design.
*/

/* ===== Bootstrap 5 overrides + custom theme ===== */

/* --- General resets --- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #1a1a2e;
  background: #fff;
}
a { color: #1a1a2e; text-decoration: none; }
a:hover { color: #000; }

/* --- Astra header → viewsnapstories style --- */
.ast-header-break-point .main-header-bar,
.main-header-bar {
  border-bottom: 1px solid rgba(0,0,0,.08) !important;
  background: #fff !important;
}
.main-header-bar .ast-container,
.main-header-menu .menu-item .menu-link {
  color: #1a1a2e !important;
}
.main-header-menu .menu-item.focus > .menu-link,
.main-header-menu .menu-item:hover > .menu-link {
  color: #000 !important;
}

/* Hide Astra default site title/logo if we inject custom brand */
.ast-site-identity { display: flex; align-items: center; gap: 8px; }
.custom-logo-link img { height: 35px; width: 35px; }

/* Force primary menu items to inline flex — matches Bootstrap navbar-nav */
.main-navigation { display: flex; align-items: center; }
.main-header-menu { display: flex; align-items: center; gap: 4px; }
.main-header-menu .menu-item { margin: 0; }
.main-header-menu .menu-link {
  padding: 8px 12px !important;
  border: none !important;
  font-size: 15px;
  font-weight: 500;
}

/* Dropdown menu — match .dropdown-menu.rounded-bottom.fade-up */
.main-header-menu .sub-menu {
  border-radius: 0 0 8px 8px !important;
  border: 1px solid rgba(0,0,0,.08) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.08) !important;
  padding: 8px 0 !important;
  background: #fff !important;
}
.main-header-menu .sub-menu .menu-link {
  padding: 6px 20px !important;
  font-size: 14px !important;
}
.main-header-menu .sub-menu .menu-item.group-start {
  border-top: 1px solid rgba(0,0,0,.08);
  margin-top: 4px;
  padding-top: 4px;
}

/* --- Theme toggle button (sun/moon) --- */
.theme-toggle {
  background: none;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  transition: background .15s;
}
.theme-toggle:hover { background: rgba(0,0,0,.05); }
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: inline; }
body.snap-dark .theme-toggle .icon-sun { display: none; }
body:not(.snap-dark) .theme-toggle .icon-moon { display: none; }

/* --- Footer — viewsnapstories style --- */
.snap-footer-bar {
  background: #f8f9fa !important;
  border-top: 1px solid rgba(0,0,0,.08) !important;
  padding: 40px 0 20px !important;
  margin-top: 3em !important;
}
.snap-footer-bar .footer-brand { font-size: 18px; font-weight: 600; }
.snap-footer-bar h6 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #6c757d; margin-bottom: 12px; }
.snap-footer-bar ul { list-style: none; margin: 0; padding: 0; }
.snap-footer-bar ul li { padding: 4px 0; }
.snap-footer-bar ul li a { font-size: 14px; color: #555; }
.snap-footer-bar ul li a:hover { color: #000; }
.snap-footer-bar hr { border-color: rgba(0,0,0,.08); }
.snap-footer-bar .copyright {
  font-size: 13px;
  color: #6c757d;
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,.08);
}

/* --- App download banner --- */
.app-download-banner {
  background: #1a1a2e;
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  position: relative;
  z-index: 1000;
}
.app-download-banner a { color: #fff; text-decoration: underline; font-weight: 600; }
.app-download-banner .banner-close-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  opacity: .7;
}
.app-download-banner .banner-close-btn:hover { opacity: 1; }

/* --- Hero / main tool section --- */
.hero-section {
  padding: 48px 0;
  text-align: center;
}
.hero-section h1 { font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.hero-section p { font-size: 16px; color: #555; max-width: 640px; margin: 0 auto 24px; }

/* --- Features grid --- */
.features-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f0f0f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

/* --- FAQ --- */
.faq { padding: 8px 0; }
.faq .question { font-weight: 600; font-size: 16px; }

/* --- Try-chips + history (preserved from v1) --- */
.try-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.try-chips .try-label { font-size: 14px; opacity: .75; }
.try-chips button {
  border: 1px solid rgba(0,0,0,.15);
  background: transparent;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s ease;
}
.try-chips button:hover { background: rgba(0,0,0,.05); }
.tool-history { margin-top: 24px; }
.tool-history h3 { font-size: 16px; margin-bottom: 8px; }
.history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,.08);
  font-size: 14px;
}
.history-row button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  opacity: .6;
}
.history-row button:hover { opacity: 1; }
.history-empty { font-size: 14px; opacity: .6; }

/* --- Responsive tweaks --- */
/* --- Downloader form: fix collision with Bootstrap's .input-group --- */
/* Bootstrap sets flex-wrap:wrap on .input-group, which pushes PASTE onto its own row. */
.snapchat-form .input-group { flex-wrap: nowrap; }
.snapchat-form .input-group input[type="text"],
.snapchat-form .input-group input[type="url"] { flex: 1 1 auto; width: auto; min-width: 0; }
.snapchat-form .paste-button { flex-shrink: 0; }

/* Collapse the empty results box so the card ends at the Download button.
   The plugin toggles .loading/.loaded on this element; without either it is empty. */
.snapchat-downloader-results-area:not(.loading):not(.loaded) { min-height: 0; padding: 0; }
.snapchat-downloader-wrap:has(.snapchat-downloader-results-area:not(.loading):not(.loaded))
  .snapchat-downloader-form-wrap { border-bottom: 0; }

@media (max-width: 768px) {
  .hero-section h1 { font-size: 1.5rem; }
  .main-header-menu { flex-direction: column; align-items: stretch; }
}
