/* =====================================================================
   DAVETİYE SAYFASI STİLLERİ (mobile-first)
   ---------------------------------------------------------------------
   Davetliler linki çoğunlukla WhatsApp'tan telefonla açar. Bu yüzden
   önce telefon tasarlanmış, büyük ekranlar için genişletilmiştir.
   Renkler şablon dosyasından (templates/invitations/{kod}/style.css)
   gelen CSS değişkenleriyle belirlenir.
   ===================================================================== */

.inv-page { max-width: 640px; margin: 0 auto; padding: 1rem .9rem 3rem; position: relative; z-index: 1; }

/* ---------- Kapak / Hero ---------- */
.inv-hero {
    background: var(--surface); border: 1px solid var(--border); border-radius: 28px;
    padding: 2.5rem 1.5rem 2rem; text-align: center; position: relative; overflow: hidden; margin-bottom: 1.25rem;
}
.inv-hero::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(212,165,116,.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite; pointer-events: none;
}
.inv-hero > * { position: relative; z-index: 1; }
.inv-cover { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; margin: 0 auto 1.25rem; display: block; border: 3px solid var(--gold); box-shadow: 0 0 30px rgba(212,165,116,.3); }
.inv-greeting { font-family: 'Playfair Display', serif; font-style: italic; color: var(--accent); font-size: 1.05rem; margin-bottom: 1rem; line-height: 1.6; }
.inv-greeting b { color: var(--primary); font-style: normal; }
.inv-small { color: var(--muted); font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; margin-bottom: .75rem; }
.inv-names { font-family: var(--names-font, 'Dancing Script', cursive); font-size: clamp(2.3rem, 11vw, 3.4rem); color: var(--primary); line-height: 1.15; word-break: break-word; }
.inv-amp { font-family: 'Playfair Display', serif; font-style: italic; color: var(--rose); font-size: 1.6rem; margin: .1rem 0; }
.inv-hero .rings { margin: 1.25rem 0; }
.inv-title { font-family: 'Playfair Display', serif; font-size: 1.05rem; margin: .5rem 0; color: var(--text); }
.inv-desc { color: var(--muted); font-size: .9rem; font-style: italic; line-height: 1.7; max-width: 460px; margin: .5rem auto 0; white-space: pre-line; }
.inv-date { font-family: 'Playfair Display', serif; font-size: 1.25rem; color: var(--accent); letter-spacing: .08em; margin-top: 1rem; }
.inv-date small { display: block; font-size: .8rem; color: var(--muted); letter-spacing: .15em; margin-top: .2rem; }

/* ---------- Bölüm kartları ---------- */
.inv-section { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 1.75rem 1.25rem; margin-bottom: 1.25rem; text-align: center; }
.inv-section h2 { font-family: 'Playfair Display', serif; font-size: 1.3rem; margin-bottom: .35rem; }
.inv-section .sec-desc { color: var(--muted); font-size: .82rem; font-style: italic; margin-bottom: 1.25rem; }

/* ---------- Geri sayım ---------- */
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.countdown div { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: .8rem .2rem; }
.countdown b { display: block; font-family: 'Playfair Display', serif; font-size: 1.7rem; color: var(--primary); }
.countdown span { font-size: .65rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

/* ---------- Mekan ---------- */
.venue-name { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700; }
.venue-address { color: var(--muted); font-size: .85rem; margin: .35rem 0 1rem; line-height: 1.5; }
.map-frame { width: 100%; height: 240px; border: 0; border-radius: 16px; margin-bottom: 1rem; filter: saturate(.85); }

/* ---------- Galeri ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; }
.gallery a { aspect-ratio: 1; overflow: hidden; border-radius: 10px; display: block; background: var(--bg); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery a:hover img { transform: scale(1.06); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 400; display: none; align-items: center; justify-content: center; padding: 1rem; }
.lightbox.show { display: flex; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 88vh; border-radius: 10px; }
.lightbox .lb-close { position: absolute; top: 1rem; right: 1rem; background: rgba(255,255,255,.15); color: #fff; border: 0; width: 42px; height: 42px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; }

/* ---------- RSVP ---------- */
.rsvp-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: 1rem; }
.rsvp-choices label { cursor: pointer; }
.rsvp-choices input { position: absolute; opacity: 0; pointer-events: none; }
.rsvp-choices span { display: block; padding: .85rem .3rem; border: 1px solid var(--border); border-radius: 14px; font-size: .85rem; font-weight: 600; background: var(--bg); transition: all .25s ease; }
.rsvp-choices input:checked + span { border-color: var(--primary); color: var(--primary); background: rgba(212,165,116,.1); }
.inv-section .input { text-align: left; }
.inv-section form { text-align: left; }

/* ---------- Anı paylaş sekmeleri ---------- */
.share-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; margin-bottom: 1rem; }
.share-tabs button { background: var(--bg); border: 1px solid var(--border); color: var(--muted); border-radius: 12px; padding: .6rem .1rem; font-size: .66rem; cursor: pointer; font-family: 'Inter', sans-serif; }
.share-tabs button i { display: block; font-size: 1.1rem; margin-bottom: .25rem; color: var(--primary); }
.share-tabs button.active { border-color: var(--primary); color: var(--primary); background: rgba(212,165,116,.08); }
.share-tabs button[disabled] { opacity: .35; cursor: not-allowed; }
.share-pane { display: none; }
.share-pane.active { display: block; animation: fadeIn .3s ease; }
.card-styles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-bottom: .75rem; }
.card-styles label input { position: absolute; opacity: 0; }
.card-styles label span { display: block; height: 44px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.card-styles label input:checked + span { border-color: var(--primary); }
.recorder { text-align: center; padding: 1rem 0; }
.rec-btn { width: 84px; height: 84px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--primary), var(--rose)); color: #fff; font-size: 2rem; cursor: pointer; box-shadow: 0 10px 30px -10px rgba(212,165,116,.6); }
.rec-btn.recording { animation: ringPulse 1.2s ease-in-out infinite; background: #c0392b; }
.rec-time { font-family: 'Playfair Display', serif; font-size: 1.4rem; margin: .75rem 0; color: var(--primary); }
.drop-zone { border: 2px dashed var(--border); border-radius: 16px; padding: 1.5rem 1rem; text-align: center; color: var(--muted); font-size: .85rem; cursor: pointer; transition: border-color .3s ease; display: block; }
.drop-zone:hover { border-color: var(--primary); }
.drop-zone i { font-size: 2rem; color: var(--primary); display: block; margin-bottom: .5rem; }
.drop-zone input { display: none; }
.file-preview { margin-top: .75rem; max-height: 220px; border-radius: 12px; }

/* ---------- Mesajlar (anı defteri) ---------- */
.messages-list { display: grid; gap: .75rem; text-align: left; }
.msg-item { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 1rem 1.1rem; }
.msg-item .msg-text { font-family: 'Playfair Display', serif; font-style: italic; line-height: 1.65; font-size: .95rem; white-space: pre-line; word-break: break-word; }
.msg-item .msg-from { font-size: .75rem; color: var(--primary); margin-top: .5rem; font-weight: 600; }
.msg-item.card-rose { background: linear-gradient(135deg, rgba(199,125,125,.25), rgba(199,125,125,.05)); }
.msg-item.card-gold { background: linear-gradient(135deg, rgba(212,165,116,.28), rgba(212,165,116,.05)); }
.msg-item.card-cream { background: linear-gradient(135deg, rgba(232,196,162,.3), rgba(232,196,162,.05)); }
.msg-item.card-night { background: linear-gradient(135deg, rgba(40,20,60,.6), rgba(20,10,30,.2)); }
.msg-item.is-card { text-align: center; border-color: var(--primary); }
.msg-item.is-card::before { content: '💌'; display: block; font-size: 1.5rem; margin-bottom: .35rem; }

/* ---------- Müzik butonu ---------- */
.music-toggle { position: fixed; left: 1.25rem; bottom: 1.25rem; width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--primary); background: var(--surface); color: var(--primary); z-index: 100; cursor: pointer; font-size: 1.1rem; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); }
.music-toggle.playing { animation: ringPulse 2s ease-in-out infinite; }

/* ---------- Önizleme / bilgi bantları ---------- */
.preview-bar { background: linear-gradient(135deg, var(--primary), var(--rose)); color: #fff; text-align: center; font-size: .8rem; padding: .6rem 1rem; border-radius: 14px; margin-bottom: 1rem; }
.preview-bar a { color: #fff; font-weight: 700; }
.inv-footer { text-align: center; font-size: .72rem; color: var(--muted); padding: 1.5rem 0; }
.inv-footer a { color: var(--primary); text-decoration: none; font-family: 'Dancing Script', cursive; font-size: 1.1rem; }

/* ---------- Albüm (anılar sayfası) ---------- */
.album-filters { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1.25rem; }
.album-grid { columns: 2 160px; column-gap: .6rem; }
.album-item { break-inside: avoid; margin-bottom: .6rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.album-item img, .album-item video { width: 100%; display: block; }
.album-item audio { width: 100%; }
.album-item .ai-body { padding: .6rem .75rem; font-size: .75rem; color: var(--muted); }
.album-item .ai-text { font-family: 'Playfair Display', serif; font-style: italic; padding: .9rem; font-size: .9rem; line-height: 1.6; white-space: pre-line; }

@media (min-width: 700px) {
    .inv-page { padding-top: 2rem; }
    .inv-hero { padding: 3.5rem 2.5rem 2.5rem; }
    .inv-section { padding: 2.25rem 2rem; }
    .gallery { grid-template-columns: repeat(4, 1fr); }
    .album-grid { columns: 3 180px; }
}

/* =====================================================================
   SÜRÜM 2 - SADE DAVETİYE DÜZENİ
   ===================================================================== */
.inv-body .container { padding-bottom: 5.5rem; }
.inv-page section { scroll-margin-top: 1rem; }

/* Kapaktaki hızlı butonlar */
.quick-actions { display: flex; gap: .5rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.quick-actions .qa { flex: 1; min-width: 90px; max-width: 140px; text-decoration: none; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: .7rem .4rem; font-size: .78rem; font-weight: 600; transition: all .25s ease; }
.quick-actions .qa span { display: block; font-size: 1.4rem; margin-bottom: .2rem; }
.quick-actions .qa:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

/* Tarih kartı */
.date-card { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: .5rem 0 1.25rem; }
.dc-day { font-family: 'Playfair Display', serif; font-size: 3.4rem; line-height: 1; color: var(--primary); font-weight: 700; }
.dc-rest { text-align: left; }
.dc-rest b { display: block; font-family: 'Playfair Display', serif; font-size: 1.3rem; }
.dc-rest span { color: var(--muted); font-size: .88rem; }
#konum .countdown { margin-bottom: 1.25rem; }

/* Mekan */
.venue-box { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 1rem; margin-bottom: 1rem; }
.venue-box .venue-address { margin: .35rem 0 0; }
.map-ph { display: flex; align-items: center; justify-content: center; background: var(--bg); border: 1px dashed var(--border); color: var(--muted); font-size: .9rem; }
.btn-row { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.btn-row .btn { flex: 1; min-width: 150px; }

/* Aileler */
.family-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.family-card { background: var(--bg); border: 1px solid var(--border); border-radius: 18px; padding: 1.1rem 1rem; }
.fc-head { font-size: .78rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.fc-names { font-family: 'Playfair Display', serif; font-size: 1.15rem; margin-bottom: .6rem; }
.fc-phone { display: flex; gap: .4rem; justify-content: center; margin-top: .4rem; }
.fc-phone .btn:first-child { flex: 1; max-width: 220px; }

/* Anı paylaş - büyük butonlar */
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.share-tile { background: var(--bg); border: 1px solid var(--border); border-radius: 18px; padding: 1.2rem .5rem; color: var(--text); font-family: 'Inter', sans-serif; font-weight: 600; font-size: .86rem; cursor: pointer; transition: all .25s ease; }
.share-tile span { display: block; font-size: 2rem; margin-bottom: .35rem; }
.share-tile:hover, .share-tile:focus { border-color: var(--primary); color: var(--primary); transform: translateY(-3px); outline: none; }
.share-grid .share-tile:only-child, .share-grid .share-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Paylaşım penceresi */
.inv-modal { position: fixed; inset: 0; background: rgba(10,4,4,.75); z-index: 500; display: none; align-items: flex-end; justify-content: center; backdrop-filter: blur(3px); }
.inv-modal.show { display: flex; }
.inv-modal-box { background: var(--surface); border: 1px solid var(--border); border-radius: 26px 26px 0 0; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; padding: 1.75rem 1.25rem 1.5rem; position: relative; animation: slideUp .3s ease; text-align: center; }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.inv-modal-close { position: absolute; top: .8rem; right: .9rem; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 1.3rem; cursor: pointer; }
.inv-modal h3 { font-family: 'Playfair Display', serif; font-size: 1.3rem; margin-bottom: .3rem; }
.inv-modal .sm-desc { color: var(--muted); font-size: .85rem; margin-bottom: 1rem; }
.inv-modal .form-group { text-align: left; }
.file-list { text-align: left; font-size: .8rem; color: var(--muted); margin-top: .5rem; }
.preview-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; margin-top: .6rem; }
.preview-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
@media (min-width: 700px) {
    .inv-modal { align-items: center; }
    .inv-modal-box { border-radius: 26px; }
    .family-grid { grid-template-columns: 1fr 1fr; }
    .share-grid { grid-template-columns: repeat(4, 1fr); }
    .share-grid .share-tile:last-child:nth-child(odd) { grid-column: auto; }
}

/* Alt sabit menü */
.inv-bottom-nav { position: fixed; left: 50%; bottom: .75rem; transform: translateX(-50%); z-index: 150; display: flex; gap: .15rem; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: .35rem; box-shadow: 0 15px 40px -15px rgba(0,0,0,.6); width: calc(100% - 1.5rem); max-width: 480px; }
.inv-bottom-nav a { flex: 1; text-align: center; text-decoration: none; color: var(--muted); font-size: .66rem; font-weight: 600; padding: .4rem .2rem; border-radius: 16px; transition: all .2s ease; }
.inv-bottom-nav a span { display: block; font-size: 1.15rem; margin-bottom: .1rem; }
.inv-bottom-nav a:hover, .inv-bottom-nav a.active { background: var(--bg); color: var(--primary); }
.music-toggle { bottom: 5.5rem; }

/* Şablon önizleme (küçük kart) modu */
.inv-mini { padding: 0 !important; max-width: none; }
.inv-mini .inv-hero { margin: 0; border-radius: 0; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.rsvp-choices span { text-align: center; line-height: 1.5; }
body.inv-body .cookie-banner { bottom: 5.5rem; }
