
.container-popup-coupon {
    display: none;
    justify-content: center;
    align-items: center;
}
.popup-coupon {
    position: fixed;
    width: calc(100% - var(--spacing-medium, 16px));
    max-width: 550px;
    top: 50%;
    transform: translateY(-50%);
    height: 100%;
    max-height: 560px;
    z-index: 100;
    border-radius: var(--border-radius-md, 10px);
    background-color: var(--secondary-color, #fff);
    box-shadow: 0 0 10px #999;
}

.popup-coupon-title {
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 20 4px 7px 0 hsl(0, 0%, 95%);
    border-bottom: 1px solid #D6D8D9;
}

.popup-coupon-title i {
    font-size: 25px;
    color: var(--primary-color, #ED1C25);
    display: inline-block; 
    margin-right: var(--spacing-small, 8px);
}

.popup-coupon-title h3 {
    font-size: 22px;
    font-weight: 700;
}

.popup-coupon-title .close-popup i{
    font-size: 18px;
    color: #D6D8D9;
}

.popup-coupon-title .close-popup i:hover {
    cursor: pointer;
}

.popup-coupon .box-coupon {
    padding: var(--spacing-small, 8px) var(--spacing-medium, 16px);
    height: 84%;
    max-height: 495px;
    overflow-y: auto;
}

.box-coupon-shipping {
    padding-top: var(--spacing-small, 8px);
    border-top: 1px solid #ededed;
}

.box-coupon-order {
    padding-bottom: var(--spacing-medium, 16px);
}

.box-coupon-title {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-small, 8px);
    align-items: center;
}

.box-coupon-title h4 {
    font-size: var(--font-size, 16px);

}

.box-coupon-title > span {
    font-size: var(--font-size-md, 14px);
    color: #9FA7AB;
}

.popup-list-coupon {
    margin-top: var(--spacing-small, 8px);
}

.popup-coupon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--border-radius-md, 10px);
    box-shadow: 0 0 5px #D6D8D9;
    position: relative;
    max-height: 128px;
    margin-bottom: var(--spacing-small, 8px);
    overflow: hidden;
}

.not-apply {
    opacity: 0.6;
}

.message-not-apply {
    margin-bottom: 8px; 
    padding: 0 8px; 
    font-size: 14px; 
    text-align: right; 
    color: #9FA7AB
}

.popup-coupon-item::before, .popup-coupon-item::after {
    content: '';
    position: absolute;
    left: 107px;
    display: block;
    width: 20px;
    height: 20px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px #D6D8D9;
    z-index: 200;
}

.popup-coupon-item::before {
    top: 0;
    transform: translateY(-55%);
}

.popup-coupon-item::after {
    bottom: 0;
    transform: translateY(55%);
}

.popup-coupon-item-l {
    padding: var(--spacing-small, 8px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-coupon-item-l svg {
    max-width: 92px;
    max-height: 98px;
}

.popup-coupon-item-l img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) !important;
}

.popup-coupon-item-r {
    padding: 12px 10px 8px 28px;
}

.unused-count {
    position: absolute;
    top: 8px;
    left: 0;
    background-color: var(--primary-color, #ED1C25);
    color: var(--text-light-2, #fff);
    padding: 0 5px;
    border-radius: 0 var(--border-radius-md, 10px) var(--border-radius-md, 10px) 0;
    font-weight: bold;
    z-index: 101;
}

.coupon-item-r-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.coupon-item-r-title h5 {
    font-size: var(--font-size-md, 14px);
    text-transform: uppercase;
}

.coupon-item-r-title span i {
    font-size: 18px;
    color: #2489F4;
}

.popup-coupon-item-r-des {
    font-size: 12.6px;
    color: #7A7E7F;
    display: -webkit-box;
    -webkit-line-clamp: 2;      /* Số dòng tối đa */
    -webkit-box-orient: vertical;
    overflow: hidden;

}

.popup-coupon-item-r .end-date {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-small, 16px);
    font-size: 13px;
    color: #2489F4;
}

.popup-coupon-item-r .end-date .status-coupon-item {
    display: block;
    text-align: center;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid #2F80ED;
    background-color: #2F80ED;
    color: var(--text-light-2, #fff);
}

.popup-coupon-item-r .end-date .status-coupon-item.applied {
    color: #2F80ED;
    background-color: var(--secondary-color, #fff);
}

.popup-coupon-item-r .end-date .status-coupon-item.applied i {
    color: #10AA71;
}

.coupon-item .fa-shipping-fast {
    background-color: #10AA71;
}

.coupon-item-r-title h5 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-coupon-item:hover {
    cursor: pointer;
}

/* Popup thông báo đã áp dụng và huỷ mã giảm giá */
.container-popup.popup-alert-apply-coupon, .container-popup.popup-alert-cancel-coupon {
    display: flex;
}
.popup-alert-apply-coupon .box-popup, .popup-alert-cancel-coupon .box-popup {
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--text-light-2, #fff);
    padding: var(--spacing-small, 8px) var(--spacing-medium, 16px);
    transition: height 0.5s ease, opacity 0.5s ease;
    height: 0;
    opacity: 0;
    visibility: hidden;
}

.popup-alert-apply-coupon .box-popup.open, .popup-alert-cancel-coupon .box-popup.open {
    opacity: 1;
    height: 38.4px;
    visibility: visible;
}

.popup-alert-apply-coupon .box-popup h4, .popup-alert-cancel-coupon .box-popup h4 {
    font-size: var(--font-size, 16px);
}
