/* ============================================
   Quick Buy Button Styles
   ============================================ */

/* Wrapper */
.bhd-quick-buy-wrapper {
    margin: 16px 0;
    width: 100%;
}

/* Button */
.bhd-quick-buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px 14px 50px;
    background: linear-gradient(135deg, #e85d75 0%, #d53f5a 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(232, 93, 117, 0.3);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.bhd-quick-buy-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.bhd-quick-buy-btn:hover:not(.disabled):not(.processing)::before {
    left: 100%;
}

.bhd-quick-buy-btn:hover:not(.disabled):not(.processing) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 93, 117, 0.4);
}

.bhd-quick-buy-btn:active:not(.disabled):not(.processing) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(232, 93, 117, 0.3);
}

.bhd-quick-buy-btn.disabled {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

.bhd-quick-buy-btn.processing {
    opacity: 0.8;
    pointer-events: none;
    cursor: wait;
}

.bhd-quick-buy-btn.processing .bhd-quick-buy-icon {
    animation: iconPulse 1.5s ease-in-out infinite;
}

.bhd-quick-buy-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    line-height: 0;
}

.bhd-quick-buy-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.bhd-quick-buy-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 100%;
}

.bhd-quick-buy-text {
    font-weight: 600;
    letter-spacing: 0.3px;
    font-size: 16px;
    line-height: 1.2;
}

/* Balance Display Inside Button */
.bhd-quick-buy-balance {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
    line-height: 1.2;
}

.bhd-quick-buy-balance strong {
    font-weight: 700;
}

/* ============================================
   Popup Overlay & Modal
   ============================================ */

.bhd-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    animation: fadeIn 0.2s forwards;
    padding: 20px;
}

.bhd-popup {
    background: white;
    border-radius: 20px;
    padding: 40px 32px 32px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
}

.bhd-popup-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.bhd-popup-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.2;
    animation: pulse 2s ease-in-out infinite;
}

.bhd-popup-icon.success {
    background: #10b981;
}

.bhd-popup-icon.success::before {
    background: #10b981;
}

.bhd-popup-icon.error {
    background: #ef4444;
}

.bhd-popup-icon.error::before {
    background: #ef4444;
}

.bhd-popup-icon.warning {
    background: #f59e0b;
}

.bhd-popup-icon.warning::before {
    background: #f59e0b;
}

.bhd-popup-icon svg {
    width: 36px;
    height: 36px;
    position: relative;
    z-index: 1;
}

.bhd-popup-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    color: #111827;
}

.bhd-popup-message {
    text-align: center;
    color: #6b7280;
    margin-bottom: 28px;
    line-height: 1.6;
    font-size: 15px;
}

.bhd-popup-message strong {
    color: #374151;
    font-weight: 600;
}

.bhd-popup-actions {
    display: flex;
    gap: 12px;
}

.bhd-popup-btn {
    flex: 1;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
}

.bhd-popup-btn-primary {
    background: linear-gradient(135deg, #e85d75 0%, #d53f5a 100%);
    color: white;
}

.bhd-popup-btn-primary:hover {
    background: linear-gradient(135deg, #d53f5a 0%, #c02d4a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(232, 93, 117, 0.3);
}

.bhd-popup-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.bhd-popup-btn-secondary:hover {
    background: #e5e7eb;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes popIn {
    to {
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.2;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

@keyframes iconPulse {

    0%,
    100% {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translateY(-50%) scale(1.2);
        opacity: 0.8;
    }
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .bhd-quick-buy-btn {
        font-size: 15px;
        padding: 12px 24px 12px 46px;
    }

    .bhd-quick-buy-icon {
        left: 14px;
    }

    .bhd-quick-buy-icon svg {
        width: 20px;
        height: 20px;
    }

    .bhd-popup {
        padding: 32px 24px 24px;
        max-width: 90%;
    }

    .bhd-popup-icon {
        width: 64px;
        height: 64px;
    }

    .bhd-popup-icon svg {
        width: 32px;
        height: 32px;
    }

    .bhd-popup-title {
        font-size: 20px;
    }

    .bhd-popup-message {
        font-size: 14px;
    }

    .bhd-popup-actions {
        flex-direction: column;
    }

    .bhd-popup-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .bhd-quick-buy-btn {
        font-size: 14px;
        padding: 12px 20px 12px 44px;
    }

    .bhd-quick-buy-icon {
        left: 12px;
    }

    .bhd-quick-buy-icon svg {
        width: 18px;
        height: 18px;
    }

    .bhd-quick-buy-balance {
        font-size: 13px;
    }

    .bhd-balance-amount {
        font-size: 14px;
    }
}