/**
 * Kontras teks & ikon — undangan tamu (semua template)
 */

.invitation-fluid ::selection {
    background: rgba(var(--primary-rgb), 0.35);
    color: #111827;
}

/* Jangan pakai background-clip:text — bikin kotak warna di belakang teks */
.cover-couple-names,
.cover-save-date,
.section-title,
.band-title {
    background: none !important;
    background-clip: border-box !important;
    -webkit-background-clip: border-box !important;
}

.cover-skin-heritage .cover-couple-names,
.cover-skin-ornate .cover-couple-names,
.cover-skin-pastoral .cover-couple-names {
    color: var(--heritage-ink) !important;
    -webkit-text-fill-color: var(--heritage-ink) !important;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.cover-couple-names {
    color: #fffdf8 !important;
    -webkit-text-fill-color: #fffdf8 !important;
}

.cover-couple-names .cover-ampersand {
    color: rgba(255, 248, 235, 0.95) !important;
    -webkit-text-fill-color: rgba(255, 248, 235, 0.95) !important;
    font-family: var(--font-display, 'Playfair Display', Georgia, serif) !important;
}

.cover-save-date {
    background: none !important;
    background-clip: border-box !important;
    -webkit-background-clip: border-box !important;
}

.cover-skin-heritage .cover-couple-names .cover-ampersand,
.cover-skin-ornate .cover-couple-names .cover-ampersand,
.cover-skin-pastoral .cover-couple-names .cover-ampersand {
    color: rgba(var(--accent-rgb), 0.88) !important;
    -webkit-text-fill-color: rgba(var(--accent-rgb), 0.88) !important;
}

/* Section terang */
.template-surface .section-eyebrow,
.template-surface .section-lead,
.template-surface .guestbook-wall-title {
    color: var(--muted) !important;
}

.template-surface .section-eyebrow i,
.template-surface .guestbook-wall-title i,
.template-surface .event-icon i {
    color: var(--icon-on-surface) !important;
}

.template-surface .section-title {
    color: var(--ink) !important;
}

/* Template gelap: section permukaan terang tetap pakai ink */
.invitation-dark-inner .template-surface.tpl-surface-bg .section-title,
.invitation-dark-inner .template-surface.tpl-surface-bg .section-eyebrow {
    color: var(--ink) !important;
    -webkit-text-fill-color: var(--ink) !important;
}

.invitation-dark-inner .template-surface.tpl-surface-bg .section-eyebrow {
    color: var(--icon-on-surface, var(--primary)) !important;
}

.invitation-dark-inner .template-surface.tpl-surface-bg .section-lead {
    color: var(--muted) !important;
}

.invitation-dark-inner #couple .premium-couple-card .text-gray-800,
.invitation-dark-inner #couple .premium-couple-card h3 {
    color: var(--ink) !important;
}

.template-surface .text-gray-800,
.template-surface .text-gray-900,
.template-surface .guestbook-form label,
.template-surface .guestbook-form__label {
    color: #1f2937 !important;
}

.template-surface .text-gray-600,
.template-surface .text-gray-500,
.template-surface .text-gray-400 {
    color: #475569 !important;
}

/* Kartu & form — permukaan solid agar FX tidak ganggu baca */
.guestbook-compose.readable-card,
#guestbook .guestbook-entry.readable-card {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(var(--primary-rgb), 0.14) !important;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08) !important;
    position: relative;
    z-index: 3;
    isolation: isolate;
}

#guestbook .template-deco-layer {
    opacity: 0.28;
    z-index: 0 !important;
}

#guestbook .guestbook-entry.readable-card,
#guestbook .guestbook-compose.readable-card {
    z-index: 3;
    isolation: isolate;
}

.guestbook-form__input,
.guestbook-form__textarea,
.guestbook-form input,
.guestbook-form textarea,
.guestbook-form select {
    background: #ffffff !important;
    color: #111827 !important;
}

.guestbook-form__label,
.guestbook-form p.guestbook-form__label {
    margin: 0 !important;
}

.guestbook-form input::placeholder,
.guestbook-form textarea::placeholder {
    color: #94a3b8 !important;
}

.guestbook-entry .guestbook-avatar {
    background: rgba(var(--primary-rgb), 0.12) !important;
    color: var(--icon-on-surface) !important;
}

.guestbook-entry .guestbook-avatar span {
    color: var(--icon-on-surface) !important;
}

/* Tombol kehadiran */
.guestbook-form .rsvp-attendance-card__icon {
    color: var(--icon-on-surface) !important;
}

.guestbook-form .rsvp-attendance-card__title {
    color: #1f2937 !important;
}

.guestbook-form .rsvp-attendance-card--yes:has(input:checked) .rsvp-attendance-card__icon {
    color: #16a34a !important;
}

.guestbook-form .rsvp-attendance-card--no:has(input:checked) .rsvp-attendance-card__icon {
    color: #dc2626 !important;
}

/* Hero & cover gelap */
.hero-pattern h1,
.hero-pattern p,
.hero-pattern span,
.cover-pattern .cover-label span,
.cover-pattern .cover-date-chip {
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.accent-band-dark .band-eyebrow,
.accent-band-dark .band-title,
.accent-band-dark .band-desc {
    color: #f8fafc !important;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.accent-band-light .band-eyebrow,
.accent-band-light .band-title {
    color: var(--ink) !important;
}

.accent-band-light .band-desc {
    color: #475569 !important;
}

/* Kartu di section terang — teks gelap (hindari gelap di atas navy) */
.template-surface.tpl-surface-bg .event-card,
.template-surface.tpl-surface-bg .readable-card:not(.fluid-glass):not(.guestbook-compose):not(.guestbook-entry) {
    color: var(--ink, #1f2937) !important;
}

.template-surface.tpl-surface-bg .event-card h3,
.template-surface.tpl-surface-bg .readable-card h3,
.template-surface.tpl-surface-bg .event-card .text-gray-800,
.template-surface.tpl-surface-bg .readable-card .text-gray-800 {
    color: var(--ink, #1f2937) !important;
}

.template-surface.tpl-surface-bg .event-card .text-gray-600,
.template-surface.tpl-surface-bg .readable-card .text-gray-600 {
    color: #475569 !important;
}

.template-surface.tpl-surface-bg .event-card .text-primary,
.template-surface.tpl-surface-bg .readable-card .text-primary {
    color: var(--icon-on-surface) !important;
}

/* Section gelap (template dark) — teks terang di kartu gelap */
.invitation-dark-inner .template-surface:not(.tpl-surface-bg) .event-card,
.invitation-dark-inner .template-surface:not(.tpl-surface-bg) .readable-card:not(.guestbook-compose):not(.guestbook-entry) {
    color: #f1f5f9 !important;
}

.invitation-dark-inner .template-surface:not(.tpl-surface-bg) .event-card h3,
.invitation-dark-inner .template-surface:not(.tpl-surface-bg) .readable-card h3 {
    color: #f8fafc !important;
}

/* Float nav */
#floatNav .nav-item i {
    color: inherit !important;
}
