/* ==========================================================================
   DÜĞÜN DAVETİYESİ - TEK EKRAN & SULUBAYA DOKULU ELİT STİL
   ========================================================================== */

:root {
  --bg: #FAF6F0;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-subtle: #F4ECE1;
  --text-main: #1C1917;
  --text-muted: #78716C;
  --text-light: #A8A29E;
  --gold: #A68042;
  --gold-light: #DFC79B;
  --border: #E8DFD1;
  --border-subtle: #F2EBE0;
  
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --shadow-sm: 0 2px 8px rgba(28, 25, 23, 0.04);
  --shadow-md: 0 16px 40px -10px rgba(28, 25, 23, 0.12);
  --shadow-lg: 0 24px 52px -12px rgba(28, 25, 23, 0.18);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
}

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

html, body {
  min-height: 100%;
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  position: relative;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(166, 128, 66, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(166, 128, 66, 0.06) 0%, transparent 40%);
}

/* ==========================================================================
   TEK EKRAN DAVETİYE KARTI
   ========================================================================== */
.single-screen-wrapper {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
}

.invitation-container {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px 18px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 13px;
  position: relative;
  background-image: url('assets/watercolor_bg.jpg');
  background-size: cover;
  background-position: center;
}

.invitation-container::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.92);
  z-index: -1;
}

/* Başlık Bloğu: İsimler ve Altında Düğün Davetiyesi */
.header-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}

.couple-names {
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.3px;
}

/* "ve" Bağlacı İçin Zarif İtalik Serif */
.couple-names .connector {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 0.65em;
  color: var(--gold);
  padding: 0 4px;
  display: inline-block;
  vertical-align: middle;
}

/* Alternatif & İşareti (Eğer kullanılırsa) */
.couple-names span.amp {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: normal !important;
  font-weight: 400;
  font-size: 0.8em;
  color: var(--gold);
  padding: 0 4px;
  display: inline-block;
  vertical-align: 1px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-muted);
}

/* Kompakt Görsel - Altın Oran Odaklı Kadraj */
.compact-photo-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 290px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  background: var(--bg-subtle);
}

.compact-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
}

/* Tarih, Mekan & Geri Sayım Bilgi Alanı */
.info-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}

.wedding-date {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.3px;
  line-height: 1.25;
}

.venue-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-top: 1px;
}

.venue-sub {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  line-height: 1.3;
}

/* Zarif Harita & Yol Tarifi Link Hapı */
.map-link-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: rgba(166, 128, 66, 0.08);
  border: 1px solid rgba(166, 128, 66, 0.22);
  align-self: center;
  margin-top: 4px;
  transition: all 0.2s ease;
}

.map-link-pill:hover {
  background: rgba(166, 128, 66, 0.16);
  border-color: var(--gold);
  color: #8C672B;
  transform: translateY(-1px);
}

.map-link-pill svg {
  width: 12px;
  height: 12px;
  color: var(--gold);
}

/* ==========================================================================
   ANA LCV AKSİYON BUTONU
   ========================================================================== */
.btn-main-rsvp {
  width: 100%;
  background: var(--text-main);
  color: #FFFFFF;
  border: 1px solid #1C1917;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px -4px rgba(28, 25, 23, 0.25);
  transition: transform 0.15s, opacity 0.15s;
}

.btn-main-rsvp:hover {
  opacity: 0.92;
}

.btn-main-rsvp:active {
  transform: scale(0.98);
}

.btn-main-rsvp svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.btn-main-rsvp:hover svg {
  transform: translateX(3px);
}

/* Alt Bar (Gizli Yönetici Erişimi) */
.bottom-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-top: 4px;
}

.love-note {
  font-size: 11.5px;
  font-style: italic;
  color: var(--text-light);
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s;
}

.love-note:active {
  opacity: 0.7;
}

/* ==========================================================================
   LCV BOTTOM SHEET MODAL
   ========================================================================== */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop.open {
  display: flex;
}

.sheet-card {
  background: #FFFFFF;
  width: 100%;
  max-width: 480px;
  border-radius: 22px 22px 0 0;
  padding: 12px 22px calc(24px + env(safe-area-inset-bottom));
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-drag-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  margin: 0 auto 14px;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.sheet-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.15;
}

.sheet-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.sheet-close-btn {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input, .form-textarea {
  width: 100%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--gold);
  background: #FFFFFF;
}

.form-textarea {
  resize: vertical;
  min-height: 60px;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.choice-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}

.choice-btn.active.yes {
  background: #EBF5EE;
  border-color: #8CC49B;
  color: #245A34;
}

.choice-btn.active.no {
  background: #FDF0F0;
  border-color: #E29E9E;
  color: #7D2828;
}

.guest-pills-wrap {
  display: flex;
  gap: 6px;
}

.guest-pill {
  flex: 1;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.guest-pill.active {
  background: var(--text-main);
  color: #FFFFFF;
  border-color: var(--text-main);
}

.btn-primary {
  width: 100%;
  background: var(--text-main);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  transition: opacity 0.15s;
}

.btn-primary:hover { opacity: 0.92; }
.btn-primary:disabled { opacity: 0.6; }

.sheet-success-box {
  text-align: center;
  padding: 24px 8px 12px;
}

.success-check {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #EBF5EE;
  color: #2E7D32;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
}

.success-title {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--text-main);
  margin-bottom: 6px;
}

.success-msg {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   YÖNETİCİ (ADMIN) MODALI
   ========================================================================== */
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.admin-modal-backdrop.open { display: flex; }

.admin-modal-box {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.2s ease-out;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.admin-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-modal-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
}

.admin-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.pin-screen {
  text-align: center;
  padding: 20px 0;
}

.pin-screen p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.pin-input {
  width: 160px;
  height: 48px;
  font-size: 24px;
  letter-spacing: 10px;
  text-align: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  margin-bottom: 14px;
}

.pin-input:focus { border-color: var(--gold); }

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.stat-box {
  background: var(--bg-subtle);
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  text-align: center;
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}

.stat-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
}

.admin-actions-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-search {
  flex: 1;
  padding: 8px 12px;
  font-size: 12.5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
}

.btn-refresh {
  background: var(--bg-subtle, #F8F6F0);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: all 0.15s;
}

.btn-refresh:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-excel {
  background: #2E7D32;
  color: #FFFFFF;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-reset {
  background: #FFF5F5;
  color: #C53030;
  border: 1px solid #FEB2B2;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: all 0.15s;
}

.btn-reset:hover {
  background: #FED7D7;
}

.guest-item-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gic-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gic-name {
  font-weight: 600;
  font-size: 14px;
}

.gic-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-yes { background: #EBF5EE; color: #245A34; }
.badge-no { background: #FDF0F0; color: #7D2828; }

.gic-note {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  background: var(--bg-subtle);
  padding: 4px 8px;
  border-radius: 4px;
}

.gic-date {
  font-size: 10px;
  color: var(--text-light);
}

.settings-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.settings-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  margin-bottom: 8px;
}

/* ==========================================================================
   RESPONSIVE UYARLAMALAR (MOBİL VE KÜÇÜK EKRANLAR)
   ========================================================================== */
@media (max-height: 720px) {
  .invitation-container {
    gap: 9px;
    padding: 16px 16px 12px;
  }
  .couple-names {
    font-size: 32px;
  }
  .compact-photo-frame {
    aspect-ratio: 16 / 11;
    max-height: 225px;
  }
  .compact-photo-frame img {
    object-position: center 28%;
  }
  .wedding-date {
    font-size: 18px;
  }
  .venue-title {
    font-size: 12px;
  }
  .map-link-pill {
    padding: 4px 12px;
    font-size: 11px;
  }
  .btn-main-rsvp {
    padding: 11px 16px;
    font-size: 13px;
  }
}

@media (min-width: 600px) {
  .sheet-card {
    border-radius: var(--radius-md);
    margin: auto;
    animation: popIn 0.25s ease-out;
  }
}

/* ─── QR Kod Üretici (Admin Panel İçi) ─── */
.admin-qr-section {
  margin-bottom: 16px;
}

.btn-qr-generate {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  background: transparent;
  border: 1px dashed var(--gold, #A68042);
  border-radius: var(--radius-sm, 8px);
  color: var(--gold, #A68042);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-qr-generate:hover {
  background: rgba(166, 128, 66, 0.08);
  border-style: solid;
}

.qr-preview-area {
  background: var(--bg-card, #FFF);
  border: 1px solid var(--border, #E8DFD1);
  border-radius: var(--radius-sm, 8px);
  padding: 20px;
  margin-top: 10px;
  text-align: center;
}

.qr-site-url {
  font-size: 11px;
  color: var(--text-muted, #9C9690);
  margin-top: 10px;
  word-break: break-all;
  font-family: monospace;
}

/* ─── Çoklu Düğün (Multi-Tenant) & Admin Studio Stilleri ─── */
.admin-wedding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-subtle, #F8F6F0);
  padding: 10px 14px;
  border-radius: var(--radius-sm, 8px);
  margin-bottom: 14px;
  border: 1px solid var(--border-subtle, #EFECE6);
}

.admin-wedding-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.admin-wedding-slug-badge {
  display: inline-block;
  font-size: 10.5px;
  font-family: monospace;
  color: var(--gold, #A68042);
  background: #FFF;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
  border: 1px solid rgba(166, 128, 66, 0.2);
}

.btn-live-view {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  background: #FFF;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.btn-live-view:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.admin-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.admin-tab-btn:hover {
  color: var(--text-main);
}

.admin-tab-btn.active {
  color: var(--gold, #A68042);
  border-bottom-color: var(--gold, #A68042);
}

.admin-tab-pane {
  display: none;
}

.admin-tab-pane.active {
  display: block;
}

/* Ayarlar & Fotoğraf Form Elemanları */
.settings-group {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.settings-group-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-main);
  margin-bottom: 8px;
}

.input-sub-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.input-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.photo-upload-container {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--bg-subtle);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
}

.photo-preview-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
  background: #FFF;
}

.photo-upload-controls {
  flex: 1;
}

.btn-upload-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--text-main);
  color: #FFF;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-upload-file:hover {
  opacity: 0.9;
}

.upload-hint {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.3;
}

/* URL Paylaşım Kutusu */
.share-box {
  background: var(--bg-subtle);
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.url-copy-box {
  display: flex;
  gap: 8px;
}

.url-display-input {
  font-family: monospace;
  font-size: 12px;
  color: var(--text-main);
  background: #FFF;
}
