/**
 * Special Offer Popup Styles
 * Modern split-screen design inspired by contemporary e-commerce popups
 */

/* Overlay */
.special-offer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.special-offer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container - Split Screen Layout */
.special-offer-modal {
    background: #ffffff;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    transform: scale(0.95) translateY(30px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: row;
}

.special-offer-overlay.active .special-offer-modal {
    transform: scale(1) translateY(0);
}

/* Close Button */
.special-offer-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    color: #333;
    font-size: 1.25rem;
    line-height: 1;
    font-weight: 300;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.special-offer-close:hover {
    background: #fff;
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Image Section (Left Side) */
.special-offer-image-section {
    flex: 0 0 42%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 450px;
}

.special-offer-image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.special-offer-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #cc1616 0%, #e82d2d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
}

.special-offer-image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.2)" stroke-width="2"/><path d="M30 50 L45 65 L70 35" fill="none" stroke="rgba(255,255,255,0.3)" stroke-width="3" stroke-linecap="round"/></svg>') center/60% no-repeat;
    opacity: 0.3;
}

/* Content Section (Right Side) */
.special-offer-content-section {
    flex: 1;
    padding: 2rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    max-height: 85vh;
}

/* Header */
.special-offer-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #cc1616;
    margin-bottom: 0.75rem;
}

.special-offer-title {
    font-size: clamp(1.5rem, 2.5vw, 1.875rem);
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: #1a1a1a;
    font-family: 'Raleway', sans-serif;
    line-height: 1.3;
}

.special-offer-headline {
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
    line-height: 1.5;
    color: #555;
    margin-bottom: 1rem;
    font-weight: 400;
}

.special-offer-headline strong {
    color: #cc1616;
    font-weight: 700;
}

.special-offer-description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #666;
    margin-bottom: 1.25rem;
}

/* What's Included List */
.special-offer-includes {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.special-offer-includes li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #444;
    font-size: 0.875rem;
    line-height: 1.4;
}

.special-offer-includes li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #cc1616;
    font-weight: bold;
    font-size: 1.1rem;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Form Styles */
.special-offer-form {
    margin-top: 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: #333;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group .required {
    color: #cc1616;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 0;
    border: none;
    border-bottom: 2px solid #e0e0e0;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: transparent;
    box-sizing: border-box;
    color: #333;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: #cc1616;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
    font-weight: 300;
    font-size: 0.9rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
    max-height: 100px;
    border-bottom: 2px solid #e0e0e0;
}

.form-feedback {
    margin: 1rem 0 0;
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-feedback.show {
    opacity: 1;
}

.form-feedback .alert {
    padding: 0.875rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.form-feedback .alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-feedback .alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Submit Button */
.special-offer-btn {
    width: 100%;
    background: #1a1a1a;
    color: #ffffff;
    padding: 0.875rem 2rem;
    border-radius: 0;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'Raleway', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.special-offer-btn:hover:not(:disabled) {
    background: #cc1616;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204, 22, 22, 0.3);
}

.special-offer-btn:active:not(:disabled) {
    transform: translateY(0);
}

.special-offer-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Legal/Disclaimer Text */
.special-offer-legal {
    margin-top: 1rem;
    font-size: 0.7rem;
    color: #999;
    line-height: 1.4;
    text-align: center;
}

.special-offer-legal a {
    color: #cc1616;
    text-decoration: underline;
}

.special-offer-legal a:hover {
    color: #e82d2d;
}

/* Scrollbar Styling for Content Section */
.special-offer-content-section::-webkit-scrollbar {
    width: 6px;
}

.special-offer-content-section::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.special-offer-content-section::-webkit-scrollbar-thumb {
    background: #cc1616;
    border-radius: 3px;
}

.special-offer-content-section::-webkit-scrollbar-thumb:hover {
    background: #e82d2d;
}

/* Prevent body scroll when modal is open */
body.special-offer-open {
    overflow: hidden;
}

/* Reopen Button - Floating Button */
.special-offer-reopen-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    animation: slideInUp 0.5s ease forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.special-offer-reopen-button {
    background: linear-gradient(135deg, #cc1616 0%, #e82d2d 100%);
    color: #ffffff;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(204, 22, 22, 0.4);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-family: 'Raleway', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.special-offer-reopen-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(204, 22, 22, 0.5);
    background: linear-gradient(135deg, #e82d2d 0%, #cc1616 100%);
}

.special-offer-reopen-button:active {
    transform: translateY(-1px);
}

.special-offer-reopen-button i {
    font-size: 1.25rem;
}

.special-offer-reopen-button span {
    white-space: nowrap;
}

/* Hide reopen button when popup is active */
.special-offer-overlay.active ~ * .special-offer-reopen-btn,
body.special-offer-open .special-offer-reopen-btn {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .special-offer-modal {
        flex-direction: column;
        max-width: 100%;
        max-height: 90vh;
    }
    
    .special-offer-image-section {
        flex: 0 0 180px;
        min-height: 180px;
    }
    
    .special-offer-content-section {
        padding: 1.5rem 1.25rem;
        max-height: calc(90vh - 180px);
    }
    
    .special-offer-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .special-offer-headline {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }
    
    .special-offer-description {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .special-offer-includes {
        margin-bottom: 1.25rem;
    }
    
    .special-offer-includes li {
        font-size: 0.8rem;
        padding: 0.35rem 0;
    }
    
    .form-group {
        margin-bottom: 0.875rem;
    }
    
    .form-group label {
        font-size: 0.75rem;
        margin-bottom: 0.35rem;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 0.9rem;
        padding: 0.65rem 0;
    }
    
    .special-offer-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.75rem;
        margin-top: 0.875rem;
    }
    
    .special-offer-legal {
        font-size: 0.65rem;
        margin-top: 0.75rem;
    }
    
    .special-offer-close {
        top: 0.75rem;
        right: 0.75rem;
        background: rgba(255, 255, 255, 0.95);
    }
}

@media (max-width: 480px) {
    .special-offer-overlay {
        padding: 0.5rem;
    }
    
    .special-offer-modal {
        border-radius: 8px;
        max-height: 92vh;
    }
    
    .special-offer-image-section {
        flex: 0 0 140px;
        min-height: 140px;
    }
    
    .special-offer-content-section {
        padding: 1.25rem 1rem;
        max-height: calc(92vh - 140px);
    }
    
    .special-offer-badge {
        font-size: 0.65rem;
        margin-bottom: 0.5rem;
    }
    
    .special-offer-title {
        font-size: 1.35rem;
        margin-bottom: 0.5rem;
    }
    
    .special-offer-headline {
        font-size: 0.9rem;
        margin-bottom: 0.625rem;
    }
    
    .special-offer-description {
        font-size: 0.8rem;
        margin-bottom: 0.875rem;
    }
    
    .special-offer-includes {
        margin-bottom: 1rem;
    }
    
    .special-offer-includes li {
        font-size: 0.75rem;
        padding: 0.3rem 0;
        padding-left: 1.25rem;
    }
    
    .form-group {
        margin-bottom: 0.75rem;
    }
    
    .form-group label {
        font-size: 0.7rem;
        margin-bottom: 0.3rem;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 0.85rem;
        padding: 0.6rem 0;
    }
    
    .form-group textarea {
        min-height: 55px;
        max-height: 80px;
    }
    
    .special-offer-btn {
        padding: 0.7rem 1.25rem;
        font-size: 0.7rem;
        margin-top: 0.75rem;
    }
    
    .special-offer-legal {
        font-size: 0.6rem;
        margin-top: 0.625rem;
        line-height: 1.3;
    }
    
    /* Reopen button mobile */
    .special-offer-reopen-btn {
        bottom: 1.5rem;
        right: 1.5rem;
    }
    
    .special-offer-reopen-button {
        padding: 0.875rem 1.25rem;
        font-size: 0.8rem;
    }
    
    .special-offer-reopen-button span {
        display: none;
    }
    
    .special-offer-reopen-button i {
        font-size: 1.5rem;
        margin: 0;
    }
}
