
.invalid {
    display: block;
    color: #BF1F0D;
    font-size: 14px;
    padding-top: 2px;
}

.gift-form:not(:has(.invalid.hidden)) .gift-input-group {
    border-color: #BF1F0D;
}

.gift-card {
    padding: 8px 0;
    border-top: 1px solid #d8d8d8;
}

.gift-card-accordion-btn:has([data-accordion-button]:checked) .arrow {
    transform: rotate(0);
}

.gift-card:has([data-accordion-button]:checked) .gift-form {
    max-height: 300px !important;
}

.gift-card-accordion-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000;
    font-size: 16px;
    font-weight: 500;
    height: 52px;
    cursor: pointer;
    transition: color 0.2s ease-in-out;
}

.gift-card-accordion-btn svg {
    display: block;
}

.gift-card-accordion-btn .btn-icon {
    display: none;
}

.gift-card-accordion-btn .arrow {
    margin-left: auto;
    display: block;
    transform: rotate(180deg);
    transition: transform 0.3s ease-in-out;
}

.gift-form {
    display: block !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.gift-form form {
    display: block;
    padding-bottom: 8px;
}

.gift-input-group {
    display: flex;
    align-items: stretch;
    padding: 4px;
    border: 1px solid #d8d8d8;
    background: #fff;
}

.gift-input-group:has(input:focus) {
    border-color: #161619;
}

.gift-input-group input[type="text"] {
    flex: 1 1 auto;
    border: none;
}

.gift-input-group input[type="text"]::placeholder {
    color: #939292;
    font-family: Geologica, sans-serif;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.5;
}

.gift-input-group button[type="submit"] {
    flex: 0 0 auto;
    color: #fff;
    padding: 0 16px;
    line-height: 44px;
    font-weight: 500;
    text-transform: uppercase;
    border: 0;
}

.gift-card-popup-button:not(:hover, :active),
.gift-input-group button[type="submit"]:not(:hover, :active) {
    background-color: #4e4544;
}

/* gift popup */
.gift-card-popup {
    position: fixed;
    inset: 0;
    z-index: 100;
    color: #000;
    background: rgba(0, 0, 0, 0.17);
    opacity: 1;
    visibility: visible;
    display: flex;
    align-items: safe center;
    justify-content: center;
    padding: 50px 16px;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.gift-card-popup.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.gift-card-popup-content {
    position: relative;
    max-width: 100%;
    width: 700px;
    display: grid;
    align-items: center;
    justify-content: center;
    padding: 60px;
    text-align: center;
    border: 1px solid #4F4645;
    background: #FFF;
    transition: transform 0.3s ease-in-out;
}

.gift-card-popup.hidden .gift-card-popup-content {
    transform: scale(0);
}

.close-notification {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    background: none !important;
    line-height: 1 !important;
    border: none !important;
    padding: 23px;
    color: #000;
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    transition: color 0.1s ease-in-out;
}

.close-notification:after,
.close-notification:before {
    content: '';
    width: 18px;
    height: 1px;
    background: currentColor;
    grid-area: 1/1/2/2;
    transform: rotate(45deg);
}

.close-notification:before {
    transform: rotate(-45deg);
}

.gift-card-popup-title {
    margin: 0 0 10px;
    color: #161619;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.4;
}

.gift-card-popup-button {
    max-width: 400px;
    color: #FFF;
    margin: 0 auto;
    width: 100%;
    font-size: 14px;
    font-weight: 500;
    line-height: 60px;
    text-transform: uppercase;
}

.gift-card-popup-text {
    margin: 0 0 36px;
    color: #161619;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.4;
}

.cart-gift-card .discount {
    text-align: right;
}

@media (hover: hover) {
    .gift-card-accordion-btn:hover {
        color: #950b0b;
    }

    .close-notification:hover {
        color: #950b0b;
    }
}

@media (max-width: 1200px) {
    .gift-card {
        padding: 6px 0;
        margin-top: 40px;
    }

    .gift-card-accordion-btn .btn-icon {
        display: block;
    }

    .gift-card-accordion-btn {
        font-weight: 300;
        height: 45px;
    }

    .checkout-side-info hr {
        margin: 0;
    }

    .checkout-side-item {
        padding-top: 18px;
    }

    .gift-form form {
        padding: 15px 0;
    }

    .gift-input-group input[type="text"]::placeholder,
    .gift-input-group input[type="text"] {
        font-size: 16px;
    }
}

@media (max-width: 520px) {
    .gift-card-popup {
        padding: 40px 20px;
    }

    .gift-input-group {
        flex-direction: column;
        gap: 11px;
        padding: 0;
        border: none;
        background: transparent;
    }

    .gift-input-group input[type="text"] {
        flex: 0 0 auto;
        padding-left: 12px;
        padding-right: 12px;
        background: #fff;
        height: 50px;
        border: 1px solid #d8d8d8;
    }

    .gift-form:not(:has(.invalid.hidden)) input[type="text"] {
        border-color: #BF1F0D;
    }

    .gift-input-group button[type="submit"] {
        flex: 0 0 auto;
        height: 50px;
        border: 0;
    }
}
