/* B2B Guest Popup Frontend Styles */

/* Overlay */
.b2b-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.b2b-popup-overlay.b2b-popup-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Position Variants */
.b2b-popup-overlay .b2b-popup-top {
    align-self: flex-start;
    margin-top: 50px;
}

.b2b-popup-overlay .b2b-popup-bottom {
    align-self: flex-end;
    margin-bottom: 50px;
}

/* Container */
.b2b-popup-container {
    position: relative;
    width: 100%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    transform: scale(1);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.b2b-popup-hidden .b2b-popup-container {
    transform: scale(0.9);
}

/* Animations */
.b2b-popup-overlay[data-animation="slide-up"] .b2b-popup-container {
    transform: translateY(0);
}

.b2b-popup-hidden[data-animation="slide-up"] .b2b-popup-container {
    transform: translateY(50px);
}

.b2b-popup-overlay[data-animation="slide-down"] .b2b-popup-container {
    transform: translateY(0);
}

.b2b-popup-hidden[data-animation="slide-down"] .b2b-popup-container {
    transform: translateY(-50px);
}

.b2b-popup-overlay[data-animation="bounce"] .b2b-popup-container {
    animation: b2bBounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes b2bBounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Close Button */
.b2b-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
}

.b2b-popup-close svg {
    width: 20px;
    height: 20px;
    color: #666;
    transition: color 0.2s;
}

.b2b-popup-close:hover {
    background: rgba(0, 0, 0, 0.15);
}

.b2b-popup-close:hover svg {
    color: #333;
}

/* Content Layout */
.b2b-popup-content {
    display: flex;
    flex-direction: column;
}

/* Image */
.b2b-popup-image {
    width: 100%;
    max-height: 200px;
    overflow: hidden;
}

.b2b-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Body */
.b2b-popup-body {
    padding: 30px;
    text-align: center;
}

/* Title */
.b2b-popup-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.3;
}

/* Subtitle */
.b2b-popup-subtitle {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px;
    opacity: 0.85;
}

/* Text Content */
.b2b-popup-text {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 25px;
}

.b2b-popup-text p {
    margin: 0 0 10px;
}

.b2b-popup-text p:last-child {
    margin-bottom: 0;
}

/* Buttons Container */
.b2b-popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Buttons */
.b2b-popup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    outline: none;
}

.b2b-popup-btn-primary {
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.35);
}

.b2b-popup-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.45);
}

.b2b-popup-btn-secondary {
    border-width: 2px;
    border-style: solid;
    background: transparent !important;
}

.b2b-popup-btn-secondary:hover {
    opacity: 0.85;
}

/* Responsive */
@media (max-width: 600px) {
    .b2b-popup-overlay {
        padding: 15px;
    }
    
    .b2b-popup-body {
        padding: 25px 20px;
    }
    
    .b2b-popup-title {
        font-size: 22px;
    }
    
    .b2b-popup-subtitle {
        font-size: 14px;
    }
    
    .b2b-popup-text {
        font-size: 14px;
    }
    
    .b2b-popup-btn {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    .b2b-popup-close {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
    }
}

/* Focus States for Accessibility */
.b2b-popup-btn:focus,
.b2b-popup-close:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .b2b-popup-overlay,
    .b2b-popup-container,
    .b2b-popup-btn {
        transition: none;
    }
    
    .b2b-popup-overlay[data-animation="bounce"] .b2b-popup-container {
        animation: none;
    }
}

/* Print - Hide Popup */
@media print {
    .b2b-popup-overlay {
        display: none !important;
    }
}
