/* ==========================================================================
   KYPHI gift card
   Visual language copied from the live Auralia gift card (cream paper, gold
   foil border) with the KYPHI logo in place of the Auralia marks.
   Shared by the checkout preview, the admin order page and the print view.
   ========================================================================== */

.kyphi-gift-card {
    --gc-gold-light: #f0dcae;
    --gc-gold: #b98f4a;
    --gc-gold-mid: #a67c3c;
    --gc-gold-deep: #8d6528;
    --gc-cream: #fdf9f0;
    --gc-ink: #3d2f1e;
    --gc-body: #4a3a26;
    --gc-muted: #6b5335;
    --gc-line: rgb(185 143 74 / 30%);

    position: relative;
    border-radius: 1.15rem;
    padding: 1px;
    background: linear-gradient(135deg, #ecd6a0 0%, #b98f4a 32%, #f0dcae 55%, #b98f4a 78%, #ecd6a0 100%);
    box-shadow: 0 18px 40px rgb(74 58 38 / 18%);
    color: var(--gc-body);
    font-family: Georgia, "Times New Roman", "Noto Naskh Arabic", "Amiri", "Traditional Arabic", serif;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.kyphi-gift-card-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: clamp(1.1rem, 3vw, 2.2rem);
    overflow: hidden;
    border-radius: 1.1rem;
    background:
        radial-gradient(circle at 92% 4%, rgb(247 222 125 / 30%), transparent 46%),
        radial-gradient(circle at 4% 98%, rgb(201 168 106 / 22%), transparent 46%),
        linear-gradient(140deg, #fdf9f0 0%, #f8f0e0 52%, #f1e6d1 100%);
    padding: clamp(1.25rem, 3.2vw, 2.15rem);
}

.kyphi-gift-card-inner::before {
    position: absolute;
    inset: 0;
    margin: 0.5rem;
    border: 1px solid rgb(185 143 74 / 28%);
    border-radius: 0.85rem;
    content: "";
    pointer-events: none;
}

/* ------------------------------------------------------------------ logo */

.kyphi-gift-card-logo {
    filter: brightness(0) saturate(100%) invert(58%) sepia(40%) saturate(520%) hue-rotate(357deg) brightness(93%) contrast(87%);
}

/* ---------------------------------------------------------------- content */

.kyphi-gift-card-body {
    position: relative;
    display: grid;
    gap: clamp(0.75rem, 1.8vw, 1.05rem);
    align-content: start;
}

.kyphi-gift-card-brand {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--gc-line);
    padding-bottom: 0.85rem;
}

.kyphi-gift-card-wordmark {
    width: clamp(7.5rem, 17vw, 9.5rem);
    height: auto;
}

.kyphi-gift-card-kicker {
    margin: 0;
    color: var(--gc-body);
    font: 600 0.8rem/1.5 Georgia, "Noto Naskh Arabic", "Traditional Arabic", serif;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.kyphi-gift-card-to,
.kyphi-gift-card-from {
    display: grid;
    gap: 0.2rem;
}

.kyphi-gift-card-to span,
.kyphi-gift-card-from span {
    color: var(--gc-muted);
    font: 600 0.75rem/1.5 Georgia, "Noto Naskh Arabic", "Traditional Arabic", serif;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.kyphi-gift-card-to strong,
.kyphi-gift-card-from strong {
    color: var(--gc-ink);
    font: 600 clamp(1.4rem, 3.4vw, 1.85rem)/1.35 Georgia, "Noto Naskh Arabic", "Traditional Arabic", serif;
    overflow-wrap: anywhere;
}

.kyphi-gift-card-message {
    margin: 0;
    color: var(--gc-body);
    font: 400 clamp(1.05rem, 2.6vw, 1.28rem)/1.75 Georgia, "Noto Naskh Arabic", "Traditional Arabic", serif;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.kyphi-gift-card-product {
    margin: 0;
    color: var(--gc-body);
    font: 600 0.85rem/1.5 Georgia, "Noto Naskh Arabic", "Traditional Arabic", serif;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.kyphi-gift-card-rule {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gc-gold);
    font-size: 0.78rem;
}

.kyphi-gift-card-rule::before,
.kyphi-gift-card-rule::after {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgb(185 143 74 / 60%), transparent);
    content: "";
}

.kyphi-gift-card-from {
    justify-items: end;
    text-align: end;
}

.kyphi-gift-card-from strong {
    font-size: clamp(1.15rem, 2.9vw, 1.45rem);
}

/* ---------------------------------------------------------------- emblem */

.kyphi-gift-card-emblem {
    position: relative;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: clamp(0.8rem, 2vw, 1.15rem);
    border-inline-start: 1px solid var(--gc-line);
    padding-inline-start: clamp(1rem, 2.6vw, 1.9rem);
    text-align: center;
}

.kyphi-gift-card-emblem::before {
    position: absolute;
    width: min(15rem, 88%);
    aspect-ratio: 1;
    border-radius: 999px;
    background: radial-gradient(circle, rgb(185 143 74 / 16%) 0%, rgb(185 143 74 / 6%) 45%, transparent 70%);
    content: "";
    pointer-events: none;
}

.kyphi-gift-card-emblem-logo {
    position: relative;
    width: clamp(6.5rem, 15vw, 9.2rem);
    height: auto;
    filter: brightness(0) saturate(100%) invert(58%) sepia(40%) saturate(520%) hue-rotate(357deg) brightness(93%) contrast(87%) drop-shadow(0 4px 12px rgb(185 143 74 / 18%));
}

.kyphi-gift-card-emblem-caption {
    position: relative;
    margin: 0;
    color: var(--gc-muted);
    font: 600 0.66rem/1.5 Georgia, "Noto Naskh Arabic", "Traditional Arabic", serif;
    letter-spacing: 0.26em;
    text-transform: uppercase;
}

/* ------------------------------------------------- checkout preview block */

.kyphi-gift-card-title {
    margin: 1.35rem 0 0.75rem;
    color: #8a6a24;
    font: 600 0.78rem/1.4 Arial, sans-serif;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.kyphi-gift-card-grid {
    display: grid;
    gap: 1rem;
}

/* ------------------------------------------------------------------ RTL */

.kyphi-gift-card[dir="rtl"] .kyphi-gift-card-kicker,
.kyphi-gift-card[dir="rtl"] .kyphi-gift-card-to span,
.kyphi-gift-card[dir="rtl"] .kyphi-gift-card-from span,
.kyphi-gift-card[dir="rtl"] .kyphi-gift-card-emblem-caption {
    letter-spacing: 0.04em;
}

.kyphi-gift-card[dir="rtl"] .kyphi-gift-card-message {
    line-height: 1.95;
}

/* --------------------------------------------------------------- mobile */

@media (max-width: 640px) {
    .kyphi-gift-card-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .kyphi-gift-card-emblem {
        order: -1;
        border-inline-start: 0;
        border-bottom: 1px solid var(--gc-line);
        padding-inline-start: 0;
        padding-bottom: 1rem;
    }

    .kyphi-gift-card-emblem-logo {
        width: 7rem;
    }

    .kyphi-gift-card-wordmark {
        width: 6.6rem;
    }

    .kyphi-gift-card-message {
        font-size: 1.02rem;
    }
}

/* ---------------------------------------------------------------- print */

@media print {
    .kyphi-gift-card {
        box-shadow: none;
    }

    .kyphi-gift-card-inner {
        grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
        gap: clamp(1.1rem, 3vw, 2.2rem);
        break-inside: avoid;
    }

    /* Keep the landscape card layout even when the page is an A6 card. */
    .kyphi-gift-card-emblem {
        order: 0;
        border-inline-start: 1px solid var(--gc-line);
        border-bottom: 0;
        padding-inline-start: clamp(1rem, 2.6vw, 1.9rem);
        padding-bottom: 0;
    }

    .kyphi-gift-card-emblem-logo {
        width: clamp(6.5rem, 15vw, 9.2rem);
    }

    .kyphi-gift-card-wordmark {
        width: clamp(7.5rem, 17vw, 9.5rem);
    }

    .kyphi-gift-card-message {
        font-size: 1.05rem;
    }
}
