#voucher-wallet {
    margin: 40px 0;
}

.voucher-wallet-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.voucher-search-form {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-gap: 8px;
    background: #EDFBFD;
    padding: 30px;
    border-radius: 4px;
}

.voucher-search-form label {
    margin: 0;
    font-weight: 600;
}

.voucher-search-form input {
    padding: 0 12px;
    min-width: 400px;
    height: 40px;
    line-height: 40px;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: .3s ease;
}

.voucher-search-form input::placeholder {
    color: #acabab;
}

.save-voucher-btn {
    height: 40px;
    line-height: 40px;
    padding: 0 20px;
    border: 0;
    background: #8cb630;
    color: #fff;
    border-radius: 4px;
    transition: .3s ease;
}

.save-voucher-btn:hover {
    background: var(--primary-dk);
}

.voucher-search-form input:focus {
    border-color: #333;
}

.voucher-wallet-header {
    margin: 20px 0;
}

.voucher-wallet-tabs {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    border-bottom: 1px solid #ccc;
    max-width: 100%;
    overflow-x: auto;
}

.voucher-wallet-tab {
    white-space: nowrap;
    padding: 10px 14px;
    position: relative;
    cursor: pointer;
}

.voucher-wallet-tab + .voucher-wallet-tab::before {
    content: "";
    width: 1px;
    height: 14px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    background: #ccc;
}

.voucher-wallet-tab.active::after {
    content: "";
    width: 100%;
    height: 2px;
    background: #8cb630;
    position: absolute;
    bottom: 0;
    left: 0;
}

.voucher-wallet-tab.active,
.voucher-wallet-tab:hover {
    color: #8cb630;
}

.voucher-wallet-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 24px;
}

.voucher-wallet-item {
    border: 1px solid #e5e5e5;
    box-shadow: var(--vc-template-box-shadow,.125rem .125rem .3125rem rgba(0,0,0,.07));
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    border-radius: 4px;
}

.voucher-img img {
    height: 100%;
    border-radius: 4px 0 0 4px;
    object-fit: cover;
}

.box-shop-image {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    border-right: 1px dashed #ddd;
    border-radius: 3px 0 0 3px;
    background-color: #fff;
}

.voucher-img .box-shop-image img {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 50%;
}

.box-shop-mall {
    padding: 1px 4px;
    border-radius: 2px;
    background-color: #d0011b;
    font-size: 10px;
    line-height: 16px;
    color: #fff;
    display: block;
    width: fit-content;
    transform: translateY(-6px);
}

.box-shop-name {
    color: rgba(0, 0, 0, .87);
    font-size: 12px;
    line-height: 0.875rem;
    margin-top: 0.3125rem;
    max-width: 90%;
    opacity: 1;
    padding: 0.25rem;
    text-align: center;
    white-space: unset;
    word-break: break-word;
    -webkit-box-pack: center;
}

.voucher-content-list:first-child {
    width: 100%;
    display: block;
}

.voucher-content-last:not(:has(.voucher-expire)) {
  display: inline-block;
}

.voucher-content-des:has(.voucher-content-list:first-child):not(:has(.voucher-content-list:nth-child(2))):not(:has(.voucher-expire)),
.voucher-content-des:has(.voucher-content-list[ng-if*="min_amount"]):not(:has(.voucher-content-list:nth-child(2))):not(:has(.voucher-expire)) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.voucher-content-des:has(.voucher-content-list[ng-if*="min_amount"]):not(:has(.voucher-content-list:nth-child(2))):not(:has(.voucher-expire)) .voucher-content-list:first-child,
.voucher-content-des:has(.voucher-content-list[ng-if*="max_discount"]):not(:has(.voucher-content-list:nth-child(2))):not(:has(.voucher-expire)) .voucher-content-list:first-child {
    width: fit-content;
}

.voucher-right {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    align-items: center;
    padding: 8px 16px;
}

.voucher-btn {
    background: transparent;
    border: 1px solid #8cb630;
    font-size: 15px;
    color: #8cb630;
    border-radius: 4px;
    padding: 6px 8px;
    transition: .3s ease;
    height: 36px;
}

.voucher-btn:hover {
    background: #8cb630;
    color: #fff;
}

.voucher-popup-btn svg{
    transform: translateY(2px);
}

.voucher-btn.voucher-copy-btn svg{
    transform: translateY(2px);
}

.voucher-subtitle {
    font-size: 14px;
}

.voucher-des {
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    margin-top: 3px;
    font-size: 14px;
    color: #333333;
}

.voucher-detail-popup .voucher-des {
    color: #ec4747;
}

.voucher-condition-title {
    color: #8cb630;
    cursor: pointer;
}

.voucher-condition-title:hover {
    color: var(--primary-dk);
    text-decoration: underline; 
}

.voucher-title {
    font-size: 18px;
    font-weight: 600;
    color: #0A0A0A;
    margin: 0 0 4px 0;
}

.voucher-detail-popup-wrapper {
    position: fixed;
    inset: 0;
    background-color: rgba(11, 11, 11, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.voucher-detail-popup-wrapper.active {
    display: flex !important;
}

.voucher-detail-popup-bg {
    position: fixed;
    inset: 0;
}

.heading-voucher-wallet {
    position: sticky;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: #fff;
    border: 1px solid #f5f5f5;
    z-index: 10;
}

.heading-voucher-wallet-title {
    font-size: 18px;
    font-weight: 700;
    color: #0A0A0A;
}

.close-modal-voucher {
    height: 24px;
    cursor: pointer;
}

.close-modal-voucher svg path {
    stroke: #a3a3a3;
}

.header-condition-content {
    position: relative;
    background-color: #fff;
    padding: 60px 20px 16px 20px;
}

.header-condition-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 140px;
    background-color: #507313;
}

.header-condition .voucher-right {
    display: block;
    align-content: center;
    border-radius: 0 3px 3px 0;
    background-color: #fff;
}

.header-condition .voucher-wallet-item {
    grid-template-columns: 120px minmax(0, 1fr);
    position: relative;
    border: none;
    border-radius: 0;
    box-shadow: 0px 4px 4px -2px #e5e5e5;
}

.voucher-detail-popup {
    position: relative;
    width: 500px;
    max-height: 90%;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 3px rgba(11, 11, 11, 0.25);
    margin: auto;
    overflow: auto;
}

.voucher-detail-popup-content {
    position: relative;
    z-index: 1;
}

.voucher-expire svg {
    width: 14px;
}

.save-voucher,
.header-condition .voucher-expire {
    display: flex;
    align-items: center;
    grid-gap: 4px;
}

.save-voucher {
    border: 1px solid #00000017;
    border-top: none;
    padding: 12px;
    color: #8cb630;
    font-size: 14px;
}

.save-voucher svg {
    width: 19px;
}

.header-condition .voucher-img img {
    height: 100%;
    object-fit: cover;
    border-radius: 3px 0 0 3px;
}

.header-condition .voucher-img .box-shop-image img {
    width: 56px;
    border-radius: 50%;
}

.header-condition .voucher-img {
    background-color: #fff;
    border-radius: 3px 0 0 3px;
}

.header-condition .voucher-img img {
    width: 100%;
}

.cart-discount-code {
    color: #8cb630;
    font-weight: 600;
}

.voucher-detail-content {
    padding: 16px;
    max-height: 40vh;
    overflow: auto;
}

.voucher-detail-content-item {
    font-size: 14px;
}

.voucher-detail-content-item:not(:last-child) {
    margin-bottom: 24px;
}

.voucher-detail-content-item strong {
    display: block;
    margin-bottom: 8px;
}

.voucher-detail-content-item ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 10px;
    margin-left: 10px;
}

.voucher-detail-content-item-full ul {
    grid-template-columns: repeat(1, 1fr);
}

.voucher-popup-footer {
    position: sticky;
    left: 0;
    bottom: 0;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,.24);
    padding: 16px 20px 20px;
    border-top: 1px solid #f5f5f5;
    z-index: 2;
}

.voucher-popup-footer button {
    width: 100%;
    background-color: #8cb630;
    border: 1px solid #8cb630;
    border-radius: 3px;
    font-size: 16px;
    height: 40px;
    font-weight: 600;
    color: #fff;
    transition: all .3s;
}

.voucher-popup-footer button:hover {
    background-color: #fff;
    color: #8cb630;
    transition: all .3s;
}

.voucher-popup-footer button svg {
    transform: translateY(2px);
}

.voucher-loading-bouncing{
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 992px) {
    .voucher-wallet-list {
        grid-template-columns: repeat(1, 1fr);
    }
}