﻿.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;
    }
}
.voucher-applied-card {
    background-color: hsl(283.64deg 35.48% 93.92%);
    border: 1px solid hsla(320, 60%, 40%, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    /* max-width: 400px; */
}
.voucher-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.voucher-details {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1rem;
}
.voucher-text {
    flex: 1;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.detail-label {
    font-size: 0.925rem;
    color: #a3297a;
}
.detail-value {
    font-weight: 500;
    color: hsl(280, 10%, 20%);
}
.icon-container {
    flex-shrink: 0;
    background-color: hsl(150, 60%, 50%);
    border-radius: 50%;
    padding: 0.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.voucher-description {
    font-size: 0.875rem;
    color: hsl(320, 60%, 40%);
    line-height: 1.4;
}
.voucher-title {
    font-size: 1rem;
    font-weight: 600;
    color: hsl(150, 60%, 50%);
    margin-bottom: 0.25rem;
}
.item-upsize {
    grid-column: 2 / 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f4eef7;
    padding: .75rem;
    border-width: 1px;
    border-radius: .75rem;
    border-color: #b087c533;
}
.upsize-option {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
}
.upsize-label {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    padding: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: #1D1D1F;
}
    .upsize-label span.title {
        font-weight: 600;
        line-height: 1.25rem;
    }
    .upsize-label span.subtitle {
        font-size: 12px;
        color: #9ca3af;
        line-height: 1.25rem;
    }
    .upsize-label span.subtitle {
        font-size: 12px;
        color: #9ca3af;
        line-height: 1.25rem;
    }
.voucher-card__points {
    font-size: 22px;
    font-weight: 700;
    color: #c262e6;
}
.upsize-tag {
    font-size: 11px;
    /* padding: 3px 8px; */
    border-radius: 10px;
    background: #a67eb1;
    color: #ffffff;
    border: 1px solid #a67eb1;
    padding: 0.5rem;
    cursor: pointer;
}
