/* ==========================================================
   Lingua Learn Gift Card Form — Modern Theme
   All colors/spacing driven by CSS variables for easy re-skinning.
   ========================================================== */

.llgc-form {
    --llgc-accent: #0f766e;        /* primary teal */
    --llgc-accent-hover: #0d6660;
    --llgc-accent-soft: #ecfdf5;   /* light accent background */
    --llgc-ink: #0f172a;           /* near-black text */
    --llgc-muted: #64748b;         /* secondary text */
    --llgc-border: #e2e8f0;
    --llgc-surface: #ffffff;
    --llgc-bg: #f8fafc;
    --llgc-radius-lg: 20px;
    --llgc-radius-md: 12px;
    --llgc-radius-sm: 8px;
    --llgc-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --llgc-shadow-lift: 0 12px 32px rgba(15, 23, 42, 0.10);

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
    color: var(--llgc-ink);

    display: block;
    max-width: 1040px;
    margin: 32px auto;
    padding: 40px;
    background: var(--llgc-surface);
    border: 1px solid var(--llgc-border);
    border-radius: var(--llgc-radius-lg);
    box-shadow: var(--llgc-shadow);
    box-sizing: border-box;
}

.llgc-layout {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
    align-items: flex-start;
}

@media (max-width: 680px) {
    .llgc-form {
        padding: 24px;
        margin: 16px auto;
        border-radius: var(--llgc-radius-md);
    }
}

/* ---------------- Preview column ---------------- */
.llgc-preview-col {
    flex: 0 0 300px;
    position: sticky;
    top: 24px;
}

.llgc-card-preview {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: var(--llgc-radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, #0f766e, #134e4a);
    box-shadow: var(--llgc-shadow-lift);
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.llgc-card-preview:hover {
    transform: translateY(-2px);
}

.llgc-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.llgc-preview-details {
    margin-top: 20px;
    padding: 20px;
    background: var(--llgc-surface);
    border: 1px solid var(--llgc-border);
    border-radius: var(--llgc-radius-md);
    box-shadow: var(--llgc-shadow);
    font-size: 14px;
    line-height: 1.7;
}

.llgc-preview-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--llgc-ink);
}

.llgc-preview-amount {
    color: var(--llgc-accent);
    font-weight: 700;
    font-size: 26px;
    margin: 6px 0 12px;
    letter-spacing: -0.02em;
}

.llgc-preview-details hr {
    border: none;
    border-top: 1px solid var(--llgc-border);
    margin: 12px 0;
}

.llgc-preview-details div {
    color: var(--llgc-muted);
}

.llgc-preview-details span {
    color: var(--llgc-ink);
    font-weight: 500;
}

/* ---------------- Form column ---------------- */
.llgc-form-col {
    flex: 1;
    min-width: 340px;
}

.llgc-form-col h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 4px;
    color: var(--llgc-ink);
}

.llgc-label {
    display: block;
    margin: 28px 0 12px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--llgc-muted);
}

.llgc-form-col > label:not(.llgc-label) {
    display: block;
    margin: 20px 0 6px;
    font-weight: 600;
    font-size: 13px;
    color: var(--llgc-muted);
}

/* Design thumbnails */
.llgc-designs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.llgc-design-thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--llgc-radius-sm);
    background-size: cover;
    background-position: center;
    border: 2px solid var(--llgc-border);
    cursor: pointer;
    position: relative;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.llgc-design-thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.10);
}

.llgc-design-thumb.is-active {
    border-color: var(--llgc-accent);
    box-shadow: 0 0 0 3px var(--llgc-accent-soft);
}

.llgc-design-thumb.is-active::after {
    content: "✓";
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: var(--llgc-accent);
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(15, 118, 110, 0.4);
}

.llgc-no-designs {
    font-size: 13px;
    color: var(--llgc-muted);
}

/* Amount buttons */
.llgc-amounts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.llgc-amt-btn {
    padding: 12px 22px;
    border: 1.5px solid var(--llgc-border);
    border-radius: 999px;
    background: var(--llgc-surface);
    color: var(--llgc-ink);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.llgc-amt-btn:hover {
    border-color: var(--llgc-accent);
    transform: translateY(-1px);
}

.llgc-amt-btn.is-active {
    background: var(--llgc-accent);
    color: #fff;
    border-color: var(--llgc-accent);
}

/* Inputs */
.llgc-row {
    display: flex;
    gap: 16px;
    margin-bottom: 4px;
}

.llgc-row > div {
    flex: 1;
}

.llgc-form input[type="text"],
.llgc-form input[type="email"],
.llgc-form input[type="date"],
.llgc-form input[type="number"],
.llgc-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--llgc-border);
    border-radius: var(--llgc-radius-sm);
    margin-top: 6px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    color: var(--llgc-ink);
    background: var(--llgc-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.llgc-form input:focus,
.llgc-form textarea:focus {
    outline: none;
    border-color: var(--llgc-accent);
    box-shadow: 0 0 0 3px var(--llgc-accent-soft);
}

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

#llgc-custom-amount {
    margin-top: 12px;
}

/* Quantity + submit */
.llgc-qty-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 32px;
}

.llgc-qty-row input {
    width: 76px;
    margin-top: 0;
    text-align: center;
}

#llgc-add-to-cart {
    background: var(--llgc-accent);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: var(--llgc-radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    flex: 1;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.25);
}

#llgc-add-to-cart:hover {
    background: var(--llgc-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 118, 110, 0.32);
}

#llgc-add-to-cart:active {
    transform: translateY(0);
}

#llgc-add-to-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#llgc-form-msg {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
}

#llgc-form-msg.is-success {
    color: var(--llgc-accent);
}

#llgc-form-msg.is-error {
    color: #dc2626;
}

/* ---------------- Mobile ---------------- */
@media (max-width: 680px) {
    .llgc-layout {
        flex-direction: column;
        gap: 24px;
    }
    .llgc-preview-col {
        flex: 1 1 auto;
        width: 100%;
        position: static;
    }
    .llgc-form-col h2 {
        font-size: 22px;
    }
    .llgc-qty-row {
        flex-wrap: wrap;
    }
    #llgc-add-to-cart {
        width: 100%;
    }
}
