﻿/*
 * Coupon card grid for zibll-child.
 *
 * Migrated from the public xkmcm.com / zibll.com coupon snippet and adapted to
 * the child-theme's liquid-glass surface language.
 */

.xkmcm-coupon-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 1200px;
    margin: 24px auto 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 575px) {
    .xkmcm-coupon-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 992px) {
    .xkmcm-coupon-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.xkmcm-coupon-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border: none;
    border-radius: var(--xkmcm-surface-radius, 12px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(244, 248, 255, 0.64)),
        rgba(248, 251, 255, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 12px 32px rgba(31, 43, 68, 0.06);
    text-align: center;
}

body.dark-theme .xkmcm-coupon-card,
body.xkmcm-liquid-glass.dark-theme .xkmcm-coupon-card {
    background:
        linear-gradient(135deg, rgba(44, 55, 76, 0.82), rgba(31, 40, 56, 0.64)),
        rgba(31, 40, 56, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 12px 32px rgba(0, 0, 0, 0.20);
}

.xkmcm-coupon-card--disabled {
    opacity: 0.92;
}

.xkmcm-coupon-card__head {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--xkmcm-brand-color, #5d86e8);
    font-weight: 700;
    line-height: 1.3;
}

.xkmcm-coupon-card__icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.xkmcm-coupon-card__title {
    font-size: 18px;
    letter-spacing: 0;
}

.xkmcm-coupon-card__code {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: rgba(93, 134, 232, 0.08);
    color: var(--xkmcm-brand-color, #5d86e8);
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    line-height: 1.4;
    transition: background-color 0.2s ease, color 0.2s ease;
}

body.dark-theme .xkmcm-coupon-card__code,
body.xkmcm-liquid-glass.dark-theme .xkmcm-coupon-card__code {
    background: rgba(86, 198, 216, 0.08);
    color: #7dd3ea;
}

.xkmcm-coupon-card__code.xkmcm-is-used {
    color: #c0392b;
    background: rgba(192, 57, 43, 0.10);
}

body.dark-theme .xkmcm-coupon-card__code.xkmcm-is-used,
body.xkmcm-liquid-glass.dark-theme .xkmcm-coupon-card__code.xkmcm-is-used {
    color: #f5a3aa;
    background: rgba(245, 163, 170, 0.12);
}

.xkmcm-coupon-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(93, 134, 232, 0.95), rgba(76, 110, 210, 0.98));
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.4;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
    box-shadow:
        0 10px 24px rgba(93, 134, 232, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.xkmcm-coupon-card__btn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 14px 30px rgba(93, 134, 232, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.xkmcm-coupon-card__btn:active {
    transform: scale(0.98);
    box-shadow:
        0 8px 18px rgba(93, 134, 232, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

body.dark-theme .xkmcm-coupon-card__btn,
body.xkmcm-liquid-glass.dark-theme .xkmcm-coupon-card__btn {
    background: linear-gradient(135deg, rgba(86, 198, 216, 0.95), rgba(62, 170, 186, 0.98));
    box-shadow:
        0 10px 24px rgba(86, 198, 216, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.xkmcm-coupon-card__btn.xkmcm-is-used {
    background: linear-gradient(135deg, rgba(173, 181, 189, 0.92), rgba(156, 163, 172, 0.94));
    color: #fff;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

body.dark-theme .xkmcm-coupon-card__btn.xkmcm-is-used,
body.xkmcm-liquid-glass.dark-theme .xkmcm-coupon-card__btn.xkmcm-is-used {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.88), rgba(89, 96, 108, 0.92));
}

.xkmcm-coupon-card__success {
    display: none;
    margin-top: 2px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(40, 167, 69, 0.10);
    color: #1f9d47;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.4;
}

body.dark-theme .xkmcm-coupon-card__success,
body.xkmcm-liquid-glass.dark-theme .xkmcm-coupon-card__success {
    background: rgba(74, 222, 128, 0.10);
    color: #86efac;
}

.xkmcm-coupon-card__success.is-visible {
    display: block;
}

.xkmcm-coupon-card__notice {
    display: none;
    margin-top: 2px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(230, 126, 34, 0.10);
    color: #b35b11;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.4;
}

body.dark-theme .xkmcm-coupon-card__notice,
body.xkmcm-liquid-glass.dark-theme .xkmcm-coupon-card__notice {
    background: rgba(250, 204, 21, 0.10);
    color: #facc15;
}

.xkmcm-coupon-card__notice.is-visible {
    display: block;
}
