/*
Theme Name: Yanadi Matrimony Ultra Max Pro
Theme URI:  https://example.com
Description: Premium wedding-house theme for Yanadi Matrimony Ultra Max Pro. Wine and gold, mobile-first, full-width plugin pages.
Author:      Dinesh
Version:     2.6.0
Text Domain: yanadi-theme-pro
*/

:root {
  --ym-wine: #6b1d4d;
  --ym-wine-deep: #3d102b;
  --ym-gold: #c9a227;
  --ym-cream: #fbf6ee;
  --ym-paper: #fffdf8;
  --ym-ink: #2d211c;
  --ym-muted: #7a6558;
  --ym-line: #ead9c4;
  --ym-header-h: 56px;
  --ym-bottom-h: 64px;
  --ym-font: "DM Sans", system-ui, sans-serif;
  --ym-serif: "Source Serif 4", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--ym-serif);
  line-height: 1.55;
  background: var(--ym-cream);
  color: var(--ym-ink);
}

a { color: var(--ym-wine); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.1rem;
}

.ym-skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 20000;
  background: #fff;
  color: var(--ym-wine);
  padding: 8px 12px;
  border-radius: 8px;
}
.ym-skip:focus { top: 12px; }

/* ===== Header =====
   Nav is a SIBLING of the header (not nested) so mobile drawer
   is never trapped by sticky/filter stacking contexts. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1600;
  background: #3d102b;
  color: #fff;
  border-bottom: 1px solid rgba(201, 162, 39, 0.55);
  padding-top: env(safe-area-inset-top);
  transition: transform .22s ease, box-shadow .22s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 10px 28px -18px rgba(0,0,0,.55);
}
.site-header.is-hidden { transform: translateY(-110%); }

.ym-bar {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  width: 100%;
  flex-wrap: nowrap;
}
.ym-nav-slot { display: contents; }

.ym-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
  flex: 1 1 0;
}
.ym-brand:hover { text-decoration: none; }
.ym-brand-mark {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--ym-gold), #e7c86a);
  color: #3b2a12;
  font-family: var(--ym-font);
  font-weight: 700;
  font-size: 1rem;
}
.ym-brand-text { min-width: 0; overflow: hidden; }
.site-title {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-tagline {
  display: none;
  font-size: 0.72rem;
  color: #f3d9a4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.ym-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
  position: relative;
  z-index: 1610;
}
.nav-toggle {
  z-index: 1615;
}

.ym-icon-btn,
.nav-toggle {
  appearance: none;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  flex: 0 0 auto;
  -webkit-tap-highlight-color: transparent;
}
.ym-icon-btn,
.nav-toggle,
.ym-bottom-nav a,
.ym-bottom-nav button,
.ym-btn,
.primary-nav a {
  touch-action: manipulation;
}
.ym-icon-btn:hover,
.nav-toggle:hover { background: rgba(255,255,255,.18); }
.ym-icon-btn:focus-visible,
.nav-toggle:focus-visible,
.primary-nav a:focus-visible {
  outline: 2px solid var(--ym-gold);
  outline-offset: 2px;
}

.ym-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-family: var(--ym-font);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px #3d102b;
}
.ym-badge[hidden] { display: none !important; }
.ym-badge-dot {
  min-width: 8px;
  width: 8px;
  height: 8px;
  padding: 0;
  top: 6px;
  right: 18px;
  box-shadow: 0 0 0 2px #fff;
}

.ym-avatar {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(201,162,39,.7);
  flex: 0 0 auto;
}
.ym-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.nav-toggle-bars {
  width: 16px;
  height: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
body.ym-nav-open .nav-toggle-bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.ym-nav-open .nav-toggle-bars span:nth-child(2) { opacity: 0; }
body.ym-nav-open .nav-toggle-bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Drawer — teleported to body on mobile so sticky header cannot trap taps */
.primary-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: min(88vw, 340px);
  height: 100dvh;
  padding: calc(12px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
  background: #2c0c1f;
  transform: translate3d(100%, 0, 0);
  transition: transform .24s ease, visibility .24s ease;
  z-index: 20050;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: -18px 0 40px -24px rgba(0,0,0,.55);
  pointer-events: none;
  visibility: hidden;
}
.primary-nav.open {
  transform: translate3d(0, 0, 0);
  pointer-events: auto;
  visibility: visible;
}
@media (max-width: 879px) {
  .primary-nav:not(.open) {
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    transform: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}
.ym-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #f3d9a4;
  font-family: var(--ym-font);
  font-size: 0.78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 6px 14px;
}
.ym-drawer-close {
  appearance: none;
  background: rgba(255,255,255,.1);
  border: 0;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.primary-nav .menu { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.primary-nav .menu li a {
  display: block;
  padding: 14px 14px;
  color: #fff;
  font-family: var(--ym-font);
  font-weight: 500;
  font-size: 1.05rem;
  border-radius: 12px;
  text-decoration: none;
}
.primary-nav .menu li a:hover,
.primary-nav .menu li a.is-active { background: rgba(255,255,255,.1); }
.primary-nav .ym-nav-cta {
  background: var(--ym-gold) !important;
  color: #3b2a12 !important;
  text-align: center;
  font-weight: 700;
  margin-top: 8px;
}

.ym-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 8, 14, .5);
  z-index: 20040;
}
.ym-nav-backdrop[hidden] { display: none !important; }
body.ym-nav-open { overflow: hidden; }
body.ym-nav-open .site-header { transform: none !important; z-index: 1600; }
body.ym-nav-open .ym-bottom-nav { visibility: hidden; }

.site-main {
  min-height: 62vh;
  padding: 0.5rem 0 2rem;
}
body.ym-is-member .site-main {
  padding-bottom: calc(var(--ym-bottom-h) + env(safe-area-inset-bottom) + 16px);
}

/* Bottom tabs */
.ym-bottom-nav {
  display: flex;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1190;
  background: rgba(255,253,248,.97);
  border-top: 1px solid var(--ym-line);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  justify-content: space-around;
  min-height: var(--ym-bottom-h);
}
.ym-bottom-nav a,
.ym-bottom-nav button {
  flex: 1;
  appearance: none;
  background: none;
  border: 0;
  color: var(--ym-muted);
  font-family: var(--ym-font);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  position: relative;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.ym-bottom-nav a.is-active,
.ym-bottom-nav button.is-active,
.ym-bottom-nav a:hover,
.ym-bottom-nav button:hover { color: var(--ym-wine); text-decoration: none; }

.site-footer {
  background: #fffaf3;
  text-align: center;
  padding: 2rem 0 1.4rem;
  font-size: 0.92rem;
  color: var(--ym-muted);
  border-top: 1px solid var(--ym-line);
}
body.ym-is-member .site-footer { padding-bottom: calc(1.4rem + var(--ym-bottom-h)); }
.site-footer a { color: var(--ym-wine); }
.ym-pro-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.1rem;
  text-align: left;
  max-width: 1000px;
  margin: 0 auto 1.2rem;
}
.ym-pro-footer-grid h4 {
  color: var(--ym-wine);
  margin-bottom: 0.35rem;
  font-family: var(--ym-font);
}
.ym-pro-footer-grid ul { list-style: none; }
.ym-pro-footer-grid li { margin: 0.25rem 0; }
.ym-copy { opacity: .8; }

@media (min-width: 880px) {
  .site-tagline { display: block; }
  .nav-toggle, .ym-drawer-head { display: none; }
  .ym-avatar { display: block; }
  .ym-nav-backdrop { display: none !important; }
  .ym-bar {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }
  .ym-nav-slot { display: block; min-width: 0; }
  .ym-brand { flex: none; }
  .primary-nav {
    position: static;
    transform: none;
    visibility: visible;
    pointer-events: auto;
    width: auto;
    height: auto;
    padding: 0;
    background: none;
    overflow: visible;
    box-shadow: none;
    z-index: auto;
  }
  .primary-nav .menu {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }
  .primary-nav .menu li a {
    padding: 8px 12px;
    font-size: 0.92rem;
    border-radius: 999px;
  }
  .primary-nav .ym-nav-cta {
    margin-top: 0;
    padding: 8px 14px !important;
  }
  .ym-nav-logout { display: none; }
  .ym-bottom-nav { display: none; }
  body.ym-is-member .site-main { padding-bottom: 2rem; }
  body.ym-is-member .site-footer { padding-bottom: 1.4rem; }
}

@media (max-width: 879px) {
  .site-title { max-width: 46vw; }
  .site-header.is-hidden { transform: none; }
  .ym-icon-btn, .nav-toggle { width: 44px; height: 44px; }
  .ym-brand-mark { width: 32px; height: 32px; }
  input, select, textarea { font-size: 16px !important; }
}

@media (max-width: 879px) {
  body.ym-page-chat .site-main {
    padding-bottom: calc(var(--ym-bottom-h) + env(safe-area-inset-bottom) + 8px);
  }
  body.ym-page-chat .site-footer { display: none; }
  body.ym-page-chat .ym-chat-shell,
  body.ym-page-chat #ym-chat-app-container {
    height: calc(100dvh - var(--ym-header-h) - var(--ym-bottom-h) - env(safe-area-inset-bottom) - 16px) !important;
    max-height: none;
    margin: 8px 8px 0 !important;
    border-radius: 16px !important;
  }
}
