/* Botón Flotante (FAB) - Elegante */
.mw-fidelity-fab {
    position: fixed;
    bottom: 25px;
    left: 25px;
    min-width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #8C090C 0%, #6B0709 100%);
    border-radius: 35px;
    box-shadow: 0 4px 20px rgba(140, 9, 12, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: mw-pulse 2.5s infinite;
    padding: 0 20px;
}

.mw-fidelity-fab.has-two-lines {
    height: auto;
    min-height: 70px;
    padding: 12px 20px;
}

.mw-fidelity-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(140, 9, 12, 0.5);
}

.mw-fidelity-fab-text {
    color: white;
    font-family: 'Montserrat', 'Helvetica Neue', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    text-align: center;
}

.mw-fidelity-fab-line {
    display: block;
    white-space: nowrap;
}

/* Animación de pulso elegante */
@keyframes mw-pulse {
    0% {
        box-shadow: 0 4px 20px rgba(140, 9, 12, 0.4), 0 0 0 0 rgba(140, 9, 12, 0.4);
    }
    70% {
        box-shadow: 0 4px 20px rgba(140, 9, 12, 0.4), 0 0 0 12px rgba(140, 9, 12, 0);
    }
    100% {
        box-shadow: 0 4px 20px rgba(140, 9, 12, 0.4), 0 0 0 0 rgba(140, 9, 12, 0);
    }
}

/* Modal Overlay */
.mw-fidelity-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mw-fidelity-modal.visible {
    opacity: 1;
}

/* Modal Content - Elegante */
.mw-fidelity-content {
    background: linear-gradient(to bottom, #FFFFFF 0%, #FEFCFB 100%);
    padding: 45px 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.mw-fidelity-modal.visible .mw-fidelity-content {
    transform: translateY(0);
}

.mw-fidelity-close {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 26px;
    font-weight: 300;
    color: #AAA;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.mw-fidelity-close:hover {
    color: #8C090C;
    background-color: rgba(140, 9, 12, 0.1);
}

/* Elementos del Modal - Estilo Editorial */
.mw-fidelity-icon {
    font-size: 42px;
    margin-bottom: 15px;
}

.mw-fidelity-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 28px;
    margin: 0 0 12px 0;
    color: #8C090C;
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.5px;
}

.mw-fidelity-text {
    font-family: 'Montserrat', 'Helvetica Neue', sans-serif;
    font-size: 13px;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.7;
    font-weight: 300;
    letter-spacing: 0.3px;
}

.mw-fidelity-text strong {
    color: #8C090C;
    font-weight: 500;
}

.mw-fidelity-input-group {
    margin-bottom: 12px;
    text-align: left;
}

.mw-fidelity-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #E5E3E0;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    box-sizing: border-box;
    transition: all 0.3s;
    background-color: #FFFFFF;
    color: #333;
}

.mw-fidelity-input::placeholder {
    color: #BBB;
    font-weight: 300;
}

.mw-fidelity-input:focus {
    border-color: #8C090C;
    outline: none;
    box-shadow: 0 0 0 3px rgba(140, 9, 12, 0.15);
    background-color: #FFFEFE;
}

.mw-fidelity-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: #777;
    margin: 20px 0 25px 0;
    text-align: left;
    line-height: 1.5;
    font-weight: 300;
}

.mw-fidelity-checkbox input[type="checkbox"] {
    accent-color: #8C090C;
    margin-top: 2px;
}

.mw-fidelity-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 4px;
    background: linear-gradient(135deg, #8C090C 0%, #A01214 100%);
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(140, 9, 12, 0.25);
}

.mw-fidelity-btn:hover {
    background: linear-gradient(135deg, #A01214 0%, #8C090C 100%);
    box-shadow: 0 6px 20px rgba(140, 9, 12, 0.4);
    transform: translateY(-1px);
}

.mw-fidelity-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* Mensaje de éxito - Elegante */
.mw-fidelity-success {
    display: none;
}

.mw-coupon-box {
    background: linear-gradient(to bottom, #FFF9F0 0%, #FEF7EC 100%);
    border: 2px solid #E8D5C4;
    padding: 28px 24px;
    margin: 25px 0;
    position: relative;
    border-radius: 6px;
}

.mw-coupon-box::before,
.mw-coupon-box::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background: linear-gradient(to right, transparent, #D4C5B0, transparent);
    left: 50%;
    transform: translateX(-50%);
}

.mw-coupon-box::before {
    top: -1px;
}

.mw-coupon-box::after {
    bottom: -1px;
}

.mw-coupon-code {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 32px;
    font-weight: 600;
    color: #8C090C;
    letter-spacing: 4px;
    display: block;
    margin: 5px 0;
}

.mw-coupon-instructions {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: #888;
    margin-top: 12px;
    font-weight: 300;
    letter-spacing: 0.5px;
    text-align: center !important;
}

/* Forzar centrado en modal de éxito */
.mw-fidelity-success {
    text-align: center !important;
}

.mw-fidelity-success * {
    text-align: center !important;
}

.mw-fidelity-success .mw-fidelity-icon,
.mw-fidelity-success .mw-fidelity-title,
.mw-fidelity-success .mw-fidelity-text,
.mw-fidelity-success .mw-coupon-box,
.mw-fidelity-success .mw-coupon-code,
.mw-fidelity-success .mw-coupon-instructions,
.mw-fidelity-success p {
    text-align: center !important;
}

.mw-coupon-code {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
}

/* Responsive */
@media (max-width: 480px) {
    .mw-fidelity-fab {
        bottom: 15px;
        left: 15px;
        right: auto;
        min-width: 60px;
        height: 60px;
        padding: 0 15px;
    }
    
    .mw-fidelity-fab.has-two-lines {
        min-height: 60px;
        padding: 10px 15px;
    }
    
    .mw-fidelity-fab-text {
        font-size: 11px;
    }
    
    .mw-fidelity-fab-line {
        font-size: 11px;
    }
    
    .mw-fidelity-content {
        padding: 35px 25px;
        margin: 10px;
    }
    
    .mw-fidelity-title {
        font-size: 24px;
    }
}
