/**
 * Joinet Bienvenida - Frontend Styles
 * Modern, responsive design for customer-facing elements
 */

/* Banner Styles */
.joinet-bienvenida-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 16px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.joinet-bienvenida-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.joinet-bienvenida-banner-icon {
    font-size: 28px;
    line-height: 1;
}

.joinet-bienvenida-banner-text {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.joinet-bienvenida-banner-cta {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    color: #ffffff;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.joinet-bienvenida-banner-cta:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.joinet-bienvenida-banner-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.joinet-bienvenida-banner-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Popup Overlay */
.joinet-bienvenida-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Popup Container */
.joinet-bienvenida-popup {
    background: #ffffff;
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    padding: 40px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.joinet-bienvenida-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.joinet-bienvenida-popup-close:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: rotate(90deg);
}

/* Popup Header */
.joinet-bienvenida-popup-header {
    text-align: center;
    margin-bottom: 32px;
}

.joinet-bienvenida-popup-icon {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 16px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.joinet-bienvenida-popup-header h2 {
    color: #1e293b;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.joinet-bienvenida-popup-header p {
    color: #64748b;
    font-size: 16px;
    line-height: 1.5;
}

/* Popup Options */
.joinet-bienvenida-popup-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.joinet-bienvenida-option {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 3px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.joinet-bienvenida-option:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.joinet-bienvenida-option.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.joinet-bienvenida-option.selected * {
    color: #ffffff !important;
}

.joinet-bienvenida-option-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 12px;
}

.joinet-bienvenida-option h3 {
    color: #1e293b;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.joinet-bienvenida-option p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 16px;
}

.joinet-bienvenida-option-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 24px;
    color: #ffffff;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.joinet-bienvenida-option-btn:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8a 100%);
    transform: scale(1.05);
}

.joinet-bienvenida-option.selected .joinet-bienvenida-option-btn {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
}

/* Popup Terms */
.joinet-bienvenida-popup-terms {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.joinet-bienvenida-popup-terms small {
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.5;
}

/* Popup Email Field */
.joinet-bienvenida-popup-email {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.joinet-bienvenida-popup-email label {
    display: block;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.joinet-bienvenida-popup-email input {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.joinet-bienvenida-popup-email input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Cart Notice */
.joinet-bienvenida-cart-notice {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #0ea5e9;
    border-radius: 8px;
    padding: 16px !important;
    margin-bottom: 20px;
}

.joinet-bienvenida-cart-notice strong {
    color: #0c4a6e;
}

.joinet-bienvenida-cart-notice .button {
    background: #0ea5e9;
    border-radius: 6px;
    color: #ffffff;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.joinet-bienvenida-cart-notice .button:hover {
    background: #0284c7;
}

/* Benefit Badge */
.joinet-bienvenida-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.joinet-bienvenida-benefit-row th,
.joinet-bienvenida-benefit-row td {
    border-top: 2px solid #e2e8f0 !important;
    padding-top: 12px !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .joinet-bienvenida-banner-content {
        flex-wrap: wrap;
    }

    .joinet-bienvenida-banner-text {
        font-size: 14px;
    }

    .joinet-bienvenida-banner-cta {
        font-size: 13px;
        padding: 8px 16px;
    }

    .joinet-bienvenida-popup {
        padding: 24px;
        border-radius: 16px;
    }

    .joinet-bienvenida-popup-header h2 {
        font-size: 22px;
    }

    .joinet-bienvenida-popup-header p {
        font-size: 14px;
    }

    .joinet-bienvenida-popup-options {
        grid-template-columns: 1fr;
    }

    .joinet-bienvenida-option {
        padding: 20px;
    }

    .joinet-bienvenida-option h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .joinet-bienvenida-banner {
        padding: 12px 16px;
    }

    .joinet-bienvenida-banner-icon {
        font-size: 24px;
    }

    .joinet-bienvenida-banner-text {
        font-size: 13px;
    }

    .joinet-bienvenida-popup {
        padding: 20px;
    }

    .joinet-bienvenida-popup-icon {
        font-size: 48px;
    }

    .joinet-bienvenida-popup-header h2 {
        font-size: 20px;
    }
}

/* Loading State */
.joinet-bienvenida-loading {
    opacity: 0.6;
    pointer-events: none;
}

.joinet-bienvenida-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
