﻿.voucher-modal {
    background: #ffffff;
    border-radius: 8px;
    width: 100%;
    max-width: 1200px; /* laptop layout width */
    max-height: 90vh;
    padding: 24px 28px 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overflow-y: auto;
}

.voucher-modal__close {
    position: absolute;
    top: 10px;
    right: 16px;
    border: 0;
    background: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.voucher-modal__title {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 600;
}

.voucher-modal__subtitle {
    margin: 0 0 18px;
    font-size: 14px;
    color: #666;
}

.voucher-list {
    overflow-y: auto;
    padding-right: 6px;
    margin-right: -6px;
}

/* ========== Layout of multiple vouchers ========== */
.voucher-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

/* ========== Voucher card base ========== */
.voucher-card {
    border-radius: 8px;
    border: 2px dashed #c29adf;
    overflow: hidden;
    background: #ffffff;
    display: grid;
    grid-template-columns: 1fr;
}

.voucher-card__segment {
    padding: 16px;
    border-bottom: 1px dashed #e1d4ef;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .voucher-card__segment:last-child {
        border-bottom: none;
    }

.voucher-card__segment--left {
    background: #fbf5ff;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #b187d8;
}

.voucher-card__segment--main {
    background: #ffffff;
}

.voucher-card__title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.voucher-card__valid {
    font-size: 13px;
    font-weight: 600;
    color: #0a9d35;
}

.voucher-card__note {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.voucher-card__not-applicable {
    font-size: 13px;
    font-weight: 600;
    color: #d14646;
    margin-top: 2px;
}

.voucher-card__segment--right {
    background: #fff1fb;
    text-align: center;
    align-items: center;
    gap: 6px;
}

.voucher-card__label {
    font-size: 12px;
    color: #777;
}

.voucher-card__points {
    font-size: 22px;
    font-weight: 700;
    color: #c262e6;
}

.voucher-card__discount {
    font-size: 20px;
    font-weight: 700;
    color: #8d60b3;
}

.voucher-card__btn {
    margin-top: 6px;
    padding: 9px 24px;
    border-radius: 4px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    background: #b26adf;
    color: #ffffff;
    cursor: pointer;
}

.voucher-card--disabled {
    border-color: #e3e3e3;
    background: #fafafa;
}

    .voucher-card--disabled .voucher-card__segment--left {
        background: #f7f7f7;
        color: #b3b3b3;
    }

    .voucher-card--disabled .voucher-card__segment--right {
        background: #f7f7f7;
    }

/* ========== Tablet & up: three-column card ========== */
@media (min-width: 768px) {
    .voucher-card {
        /*grid-template-columns: 180px minmax(0, 1fr) 190px;*/
    }

    .voucher-card__segment {
        border-bottom: none;
        border-right: 1px dashed #e1d4ef;
    }

        .voucher-card__segment:last-child {
            border-right: none;
        }

    .voucher-card__segment--left {
        align-items: center;
    }

    .voucher-card__segment--right {
        justify-content: center;
    }
}

/* ========== Laptop: two vouchers in a row ========== */
@media (min-width: 1024px) {
    .voucher-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .voucher-modal__title,
    .voucher-modal__subtitle {
        text-align: left;
    }
}

/* ========== Small mobile tweaks ========== */
@media (max-width: 480px) {
    .voucher-modal {
        max-width: 360px;
        padding: 20px 16px 12px;
    }

    .voucher-modal__title,
    .voucher-modal__subtitle {
        text-align: center;
    }
}