/* ==========================================================================
   Invitation Core — gaya dasar. Semua bisa ditimpa dari tab Style Elementor.
   ========================================================================== */

/* ---------- Layout kartu (acara, rekening, cerita) ---------- */
.invc-events,
.invc-gifts,
.invc-story {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}

.invc-card {
	min-width: 0;
	overflow-wrap: anywhere;
}

.invc-event__name,
.invc-story__title {
	margin: 0 0 6px;
}

.invc-event__date,
.invc-event__time,
.invc-event__venue,
.invc-event__address,
.invc-event__note,
.invc-gift__bank,
.invc-gift__number,
.invc-gift__name {
	margin: 0 0 4px;
}

.invc-gift__number {
	font-size: 1.25em;
	letter-spacing: .04em;
}

/* ---------- Tombol (maps, salin) ---------- */
.invc-btn {
	display: inline-block;
	margin-top: 12px;
	padding: 10px 20px;
	border: 0;
	border-radius: 999px;
	background-color: #111;
	color: #fff;
	font: inherit;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, opacity .2s ease;
}

.invc-btn:hover,
.invc-btn:focus {
	text-decoration: none;
	opacity: .9;
}

.invc-btn.is-copied {
	opacity: .8;
}

/* ---------- Dresscode ---------- */
.invc-dresscode {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--invc-swatch-gap, 10px);
}

.invc-dresscode__swatch {
	display: inline-block;
	width: var(--invc-swatch-size, 40px);
	height: var(--invc-swatch-size, 40px);
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); /* supaya warna putih tetap terlihat */
	/* Cegah warna terbalik oleh Force Dark / mode gelap paksa */
	color-scheme: only light;
	forced-color-adjust: none;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}

/* ---------- Foto ---------- */
.invc-photo {
	max-width: 100%;
	line-height: 0;
}

.invc-photo__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: cover;
}

/* ---------- Tanggal ---------- */
.invc-date {
	margin: 0;
}

/* ---------- Pemutar lagu ---------- */
.invc-audio {
	--invc-audio-x: 20px;
	--invc-audio-y: 20px;
	--invc-spin-speed: 4s;
	z-index: 999;
	transition: opacity .35s ease, visibility .35s ease;
}

.invc-audio-pos-br .invc-audio,
.invc-audio-pos-bl .invc-audio,
.invc-audio-pos-tr .invc-audio,
.invc-audio-pos-tl .invc-audio {
	position: fixed;
}

.invc-audio-pos-br .invc-audio { right: var(--invc-audio-x); bottom: calc(var(--invc-audio-y) + env(safe-area-inset-bottom, 0px)); }
.invc-audio-pos-bl .invc-audio { left: var(--invc-audio-x); bottom: calc(var(--invc-audio-y) + env(safe-area-inset-bottom, 0px)); }
.invc-audio-pos-tr .invc-audio { right: var(--invc-audio-x); top: calc(var(--invc-audio-y) + env(safe-area-inset-top, 0px)); }
.invc-audio-pos-tl .invc-audio { left: var(--invc-audio-x); top: calc(var(--invc-audio-y) + env(safe-area-inset-top, 0px)); }

.invc-audio-pos-inline .invc-audio {
	position: relative;
	display: flex;
	justify-content: var(--invc-audio-inline-align, flex-start);
}

.invc-audio__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, .65);
	color: #fff;
	cursor: pointer;
	line-height: 1;
	-webkit-tap-highlight-color: transparent;
	transition: opacity .2s ease, transform .2s ease;
}

.invc-audio__btn:active {
	transform: scale(.94);
}

.invc-audio__icon {
	display: none;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	line-height: 1;
}

.invc-audio__icon svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.invc-audio.is-paused .invc-audio__icon--play,
.invc-audio.is-playing .invc-audio__icon--pause {
	display: inline-flex;
}

.invc-audio--spin.is-playing .invc-audio__btn {
	animation: invc-spin var(--invc-spin-speed, 4s) linear infinite;
}

@keyframes invc-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.invc-audio--spin.is-playing .invc-audio__btn { animation: none; }
}

/* Disembunyikan sampai lagu mulai (tetap terlihat di editor Elementor). */
.invc-audio--hide-before:not(.is-started) {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.elementor-editor-active .invc-audio--hide-before:not(.is-started) {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* ---------- Placeholder (hanya di editor) ---------- */
.invc-placeholder {
	padding: 14px 16px;
	border: 1px dashed #c3c4c7;
	border-radius: 8px;
	background: #f6f7f7;
	color: #50575e;
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
}

/* ---------- Repeater Listing ---------- */
.invc-listing {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}

.invc-listing__item {
	min-width: 0;
}

/* Beri class "invc-hide-last" ke elemen pemisah di template item:
   otomatis hilang di item terakhir. "invc-hide-first" untuk item pertama. */
.invc-listing__item.is-last .invc-hide-last,
.invc-listing__item.is-first .invc-hide-first {
	display: none !important;
}

.elementor-button.is-copied,
.invc-btn.is-copied {
	opacity: .8;
}

/* ---------- Countdown ---------- */
.invc-countdown__items {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.invc-countdown__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 64px;
	padding: 12px 8px;
	text-align: center;
	line-height: 1.1;
}

.invc-countdown-equal-yes .invc-countdown__item {
	flex: 1 1 0;
}

.invc-countdown__num {
	font-size: 2em;
	font-variant-numeric: tabular-nums;
}

.invc-countdown__label {
	margin-top: 4px;
	font-size: .85em;
}

.invc-countdown__done {
	display: none;
	text-align: center;
}

.invc-countdown.is-expired[data-expire="text"] .invc-countdown__items {
	display: none;
}

.invc-countdown.is-expired[data-expire="text"] .invc-countdown__done {
	display: block;
}

/* ---------- Save The Date ---------- */
.invc-std {
	text-align: center;
}

.invc-std__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.invc-std__icon {
	display: inline-flex;
	line-height: 1;
}

.invc-std__icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.invc-std__menu {
	display: inline-flex;
	flex-direction: column;
	min-width: 220px;
	margin-top: 10px;
	padding: 6px;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .15);
	text-align: left;
}

.invc-std__menu[hidden],
.invc-std__notice[hidden] {
	display: none;
}

.invc-std__opt {
	display: block;
	padding: 10px 14px;
	border-radius: 8px;
	color: #111;
	text-decoration: none;
}

.invc-std__opt:hover,
.invc-std__opt:focus {
	background: rgba(0, 0, 0, .06);
	text-decoration: none;
}

.invc-std__notice {
	max-width: 320px;
	margin: 10px auto 0;
	font-size: .85em;
	line-height: 1.5;
	opacity: .85;
}

/* ---------- Form RSVP ---------- */
.invc-rsvp__form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.invc-rsvp__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.invc-rsvp__field[hidden],
.invc-rsvp__status[hidden],
.invc-rsvp__notice[hidden] {
	display: none;
}

.invc-rsvp__label {
	font-weight: 600;
	font-size: .95em;
}

.invc-rsvp__input {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 10px;
	background: #fff;
	color: inherit;
	font: inherit;
	font-size: 16px; /* cegah zoom otomatis di iPhone */
	line-height: 1.4;
	outline: none;
	transition: border-color .2s ease, box-shadow .2s ease;
	-webkit-appearance: none;
	appearance: none;
}

select.invc-rsvp__input {
	padding-right: 36px;
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
}

textarea.invc-rsvp__input {
	resize: vertical;
	min-height: 90px;
}

.invc-rsvp__input:focus {
	border-color: currentColor;
}

.invc-rsvp__choices {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.invc-rsvp__choice {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	cursor: pointer;
}

/* Gaya "tombol pilihan" */
.invc-rsvp__choices--buttons {
	flex-wrap: wrap;
}

.invc-rsvp__choices--buttons .invc-rsvp__choice {
	flex: 1 1 auto;
}

.invc-rsvp__choices--buttons .invc-rsvp__choice input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.invc-rsvp__choices--buttons .invc-rsvp__choice span {
	display: block;
	width: 100%;
	padding: 11px 14px;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 10px;
	text-align: center;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.invc-rsvp__choices--buttons .invc-rsvp__choice input:checked + span {
	border-color: #111;
	background-color: #111;
	color: #fff;
}

.invc-rsvp__choices--buttons .invc-rsvp__choice input:focus-visible + span {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.invc-rsvp__check {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	cursor: pointer;
}

.invc-rsvp__actions .invc-rsvp__submit {
	margin-top: 4px;
}

.invc-rsvp__submit[disabled] {
	opacity: .6;
	cursor: wait;
}

.invc-rsvp__status,
.invc-rsvp__notice {
	font-size: .9em;
	line-height: 1.5;
}

.invc-rsvp__status.is-error {
	color: #b42318;
}

.invc-rsvp__notice {
	margin-bottom: 10px;
	opacity: .85;
}

.invc-rsvp__closed {
	line-height: 1.6;
}

.invc-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- Daftar ucapan ---------- */
.invc-gb__summary {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-bottom: 16px;
}

.invc-gb__stat {
	display: flex;
	flex: 1 1 90px;
	flex-direction: column;
	align-items: center;
	padding: 10px 12px;
	border-radius: 10px;
	background: rgba(0, 0, 0, .04);
	text-align: center;
}

.invc-gb__stat-num {
	font-size: 1.5em;
	font-weight: 700;
	line-height: 1.2;
}

.invc-gb__stat-label {
	font-size: .8em;
	opacity: .8;
}

.invc-gb__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	-webkit-overflow-scrolling: touch;
}

.invc-gb__item {
	padding: 14px 16px;
	border-radius: 12px;
	background: rgba(0, 0, 0, .03);
	overflow-wrap: anywhere;
}

.invc-gb__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
	margin-bottom: 6px;
}

.invc-gb__name {
	font-weight: 700;
}

.invc-gb__badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 99px;
	background: rgba(0, 0, 0, .07);
	font-size: .75em;
	line-height: 1.6;
}

.invc-gb__message {
	white-space: pre-line;
	line-height: 1.6;
}

.invc-gb__time {
	margin-top: 6px;
	font-size: .8em;
	opacity: .65;
}

.invc-gb__reply {
	margin-top: 10px;
	padding: 10px 12px;
	border-left: 3px solid currentColor;
	border-radius: 8px;
	background: rgba(0, 0, 0, .04);
}

.invc-gb__reply-title {
	margin-bottom: 4px;
	font-size: .8em;
	font-weight: 700;
}

.invc-gb__reply-text {
	white-space: pre-line;
	line-height: 1.6;
}

.invc-gb__empty {
	padding: 12px 0;
	text-align: center;
	opacity: .75;
}

.invc-gb__empty[hidden],
.invc-gb__more[hidden] {
	display: none;
}

.invc-gb__more-wrap {
	text-align: center;
}

.invc-gb.is-loading .invc-gb__more {
	opacity: .6;
	pointer-events: none;
}
