/* ==========================================================================
   Barberdepot gift overview + wizard modal
   Barberdepot style: white panel, black text, yellow accents.
   ========================================================================== */

/* --- Modal shell --------------------------------------------------------- */

.bbdepot-gift-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bbdepot-gift-modal[hidden] {
    display: none;
}

body.bbdepot-gift-modal-open {
    overflow: hidden;
}

.bbdepot-gift-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.bbdepot-gift-modal-panel {
    position: relative;
    width: min(480px, calc(100vw - 32px));
    max-height: min(640px, calc(100vh - 48px));
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.bbdepot-gift-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #000;
    border: none;
    border-radius: 999px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.bbdepot-gift-modal-close:hover {
    background: #e5e7eb;
    color: #000;
}

.bbdepot-gift-modal-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: inherit;
}

.bbdepot-gift-modal-loading {
    padding: 48px 24px;
    text-align: center;
    color: #4b5563;
}

.bbdepot-gift-overview,
.bbdepot-gift-wizard {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* --- Header --------------------------------------------------------------- */

.bbdepot-gift-modal-header {
    padding: 20px 24px 12px;
    text-align: center;
}

.bbdepot-gift-modal-icon {
    display: block;
    font-size: 26px;
    line-height: 1;
    margin-bottom: 6px;
}

.bbdepot-gift-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.bbdepot-gift-modal-header p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #6b7280;
}

.bbdepot-gift-wizard-counter {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    background: #fef9c3;
    border: 1px solid #facc15;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #000;
}

/* --- Overview tiers -------------------------------------------------------- */

.bbdepot-gift-overview-tiers {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bbdepot-gift-tier {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    opacity: 0.65;
}

.bbdepot-gift-tier.is-unlocked {
    opacity: 1;
    border-color: #facc15;
}

.bbdepot-gift-tier-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.bbdepot-tier-amount {
    font-weight: 700;
    color: #000;
    font-size: 14px;
}

.bbdepot-tier-sub {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.bbdepot-tier-choose-hint {
    font-size: 11px;
    color: #6b7280;
}

.bbdepot-tier-note {
    margin: 0 0 8px;
    font-size: 12px;
    color: #6b7280;
}

.bbdepot-tier-badge {
    margin-left: auto;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.bbdepot-tier-badge.is-unlocked {
    background: #fef9c3;
    border: 1px solid #facc15;
    color: #000;
}

.bbdepot-tier-badge.is-claimed {
    background: #ecfdf5;
    border: 1px solid #86efac;
    color: #15803d;
}

.bbdepot-tier-badge.is-locked {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #6b7280;
}

.bbdepot-gift-tier-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* --- Gift rows -------------------------------------------------------------- */

.bbdepot-gift-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    background: #f9fafb;
    border-radius: 8px;
}

.bbdepot-gift-item.is-unavailable {
    opacity: 0.5;
}

.bbdepot-gift-item-image {
    flex: 0 0 44px;
    line-height: 0;
}

.bbdepot-gift-item-image img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
}

.bbdepot-gift-item-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: #000;
    line-height: 1.3;
}

.bbdepot-gift-item-price {
    flex: 0 0 auto;
    text-align: right;
    font-size: 12px;
    line-height: 1.3;
    color: #6b7280;
}

.bbdepot-gift-item-price del {
    display: block;
    color: #9ca3af;
}

.bbdepot-gift-item-price strong {
    color: #b45309;
    font-weight: 800;
    letter-spacing: 0.02em;
}

/* --- Wizard options ---------------------------------------------------------- */

.bbdepot-gift-wizard-options {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 20px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bbdepot-gift-option {
    display: block;
    margin: 0;
    cursor: pointer;
}

.bbdepot-gift-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bbdepot-gift-option-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bbdepot-gift-option-inner::before {
    content: "";
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    box-sizing: border-box;
}

.bbdepot-gift-option input[type="radio"]:checked + .bbdepot-gift-option-inner {
    border-color: #000;
    box-shadow: 0 0 0 1px #000;
}

.bbdepot-gift-option input[type="radio"]:checked + .bbdepot-gift-option-inner::before {
    border-color: #000;
    border-width: 6px;
}

.bbdepot-gift-option-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bbdepot-gift-option .bbdepot-gift-variation {
    max-width: 220px;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #000;
}

.bbdepot-gift-wizard-error {
    margin: 0;
    padding: 8px 20px 0;
    color: #b91c1c;
    font-size: 13px;
    text-align: center;
}

/* --- Footer / buttons ---------------------------------------------------------- */

.bbdepot-gift-modal-footer {
    padding: 14px 20px 20px;
    border-top: 1px solid #f3f4f6;
    background: #fff;
}

.bbdepot-gift-btn {
    display: block;
    width: 100%;
    padding: 14px 18px;
    background: var(--theme-button-background-initial-color, #f7b500);
    color: #000;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.bbdepot-gift-btn:hover {
    background: var(--theme-button-background-hover-color, #f59e0b);
    color: #000;
}

.bbdepot-gift-btn:disabled,
.bbdepot-gift-btn.is-loading {
    opacity: 0.6;
    cursor: wait;
}

/* --- Progress bar banner button (side cart / cart / checkout) ------------------- */

.bbdepot-gift-wizard-open {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 12px;
    padding: 12px 14px;
    background: #fef9c3;
    color: #000;
    border: 1px solid #facc15;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.bbdepot-gift-wizard-open:hover {
    background: #fef08a;
    color: #000;
}

.bbdepot-gift-wizard-open-icon {
    font-size: 16px;
    line-height: 1;
}

.bbdepot-gift-wizard-open-label {
    flex: 1 1 auto;
}

.bbdepot-gift-wizard-open-arrow {
    font-size: 20px;
    line-height: 1;
}

.bbdepot-gift-progress--mini-cart .bbdepot-gift-wizard-open {
    margin-top: 10px;
    padding: 10px 12px;
    font-size: 13px;
}

/* --- Mobile ---------------------------------------------------------------------- */

@media screen and (max-width: 600px) {
    .bbdepot-gift-modal {
        align-items: flex-end;
    }

    .bbdepot-gift-modal-panel {
        width: 100vw;
        max-height: 85vh;
        border-radius: 16px 16px 0 0;
    }
}
