/**
 * IPTV Lead Generation System - Styles
 */

/* Modal overlay */
.iptv-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.iptv-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

/* Modal content */
.iptv-modal-content {
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(229, 9, 20, 0.3);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid rgba(229, 9, 20, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
}

.iptv-modal.show .iptv-modal-content {
    transform: scale(1);
}

/* Modal header */
.iptv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid rgba(229, 9, 20, 0.3);
    background: linear-gradient(135deg, #E50914 0%, #ff1e2d 100%);
    position: relative;
    overflow: hidden;
}

.iptv-modal-header::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"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.iptv-modal-header h3 {
    margin: 0;
    color: white;
    font-size: 22px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    position: relative;
    z-index: 2;
}

.iptv-modal-close {
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    z-index: 3;
    font-weight: bold;
}

.iptv-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    transform: rotate(90deg) scale(1.1);
}

/* Modal body */
.iptv-modal-body {
    padding: 30px;
    color: #e0e0e0;
    background: rgba(255, 255, 255, 0.02);
}

.iptv-modal-body > p {
    margin-bottom: 25px;
    text-align: center;
    color: #c0c0c0;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
}

/* Form styles */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"] {
    width: 100%;
    padding: 16px 20px;
    background: rgba(42, 42, 42, 0.8);
    border: 2px solid rgba(64, 64, 64, 0.6);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-sizing: border-box;
    backdrop-filter: blur(5px);
    position: relative;
}

.form-group input:focus {
    outline: none;
    border-color: #E50914;
    box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.15), 0 8px 25px rgba(229, 9, 20, 0.1);
    background: rgba(51, 51, 51, 0.9);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #999;
    font-style: italic;
    transition: color 0.3s ease;
}

.form-group input:focus::placeholder {
    color: #bbb;
}

/* Error and success states */
.form-group.error input {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.1), 0 4px 15px rgba(255, 68, 68, 0.1);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-group.success input {
    border-color: #00aa44;
    background: rgba(0, 170, 68, 0.15);
    box-shadow: 0 0 0 3px rgba(0, 170, 68, 0.1), 0 4px 15px rgba(0, 170, 68, 0.1);
}

.error-message {
    color: #ff4444;
    font-size: 12px;
    margin-top: 5px;
    display: flex;
    align-items: center;
}

.error-message:before {
    content: "⚠️";
    margin-right: 5px;
}

/* Submit button */
.iptv-submit-btn {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #E50914 0%, #ff1e2d 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 25px rgba(229, 9, 20, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.iptv-submit-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;
}

.iptv-submit-btn:hover::before {
    left: 100%;
}

.iptv-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff1e2d 0%, #E50914 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(229, 9, 20, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.iptv-submit-btn:active {
    transform: translateY(-1px);
}

.iptv-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.2);
}

/* Cancel/Secondary button */
.iptv-cancel-btn {
    width: 100%;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.05);
    color: #cccccc;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 12px;
}

.iptv-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    color: white;
}

/* Trust indicators */
.iptv-trust-indicators {
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid rgba(229, 9, 20, 0.2);
    background: rgba(229, 9, 20, 0.05);
    border-radius: 8px;
    text-align: center;
}

.trust-item {
    display: inline-flex;
    align-items: center;
    margin: 0 15px 8px 0;
    font-size: 13px;
    color: #e0e0e0;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(229, 9, 20, 0.3);
}

.trust-icon {
    margin-right: 8px;
    font-size: 16px;
    color: #00aa44;
}

/* Message styles */
.iptv-message {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.iptv-message.success {
    background: rgba(0, 170, 68, 0.1);
    border: 1px solid rgba(0, 170, 68, 0.3);
    color: #00aa44;
}

.iptv-message.error {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
}

.message-icon {
    margin-right: 15px;
    font-size: 24px;
}

.message-text h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.message-text p {
    margin: 0;
    font-size: 14px;
}

/* Loading animation */
.btn-loader {
    display: inline-flex;
    align-items: center;
}

.btn-loader:after {
    content: "";
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Body scroll lock when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Responsive design */
@media (max-width: 768px) {
    .iptv-modal {
        padding: 10px;
    }
    
    .iptv-modal-content {
        max-height: 95vh;
        border-radius: 8px;
    }
    
    .iptv-modal-header {
        padding: 15px 20px;
    }
    
    .iptv-modal-header h3 {
        font-size: 18px;
    }
    
    .iptv-modal-body {
        padding: 20px;
    }
    
    .form-group input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .iptv-modal-header {
        padding: 12px 15px;
    }
    
    .iptv-modal-header h3 {
        font-size: 16px;
    }
    
    .iptv-modal-body {
        padding: 15px;
    }
    
    .trust-item {
        font-size: 13px;
    }
}

/* Animation for modal entrance */
.iptv-modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.iptv-modal.show {
    opacity: 1;
}

.iptv-modal-content {
    transform: translateY(-50px) scale(0.9);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.iptv-modal.show .iptv-modal-content {
    transform: translateY(0) scale(1);
}

/* Focus styles for accessibility */
.iptv-modal input:focus,
.iptv-modal button:focus {
    outline: 2px solid #E50914;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .iptv-modal-content {
        border: 2px solid white;
    }
    
    .form-group input {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .iptv-modal,
    .iptv-modal-content,
    .iptv-submit-btn,
    .btn-loader:after {
        transition: none;
        animation: none;
    }
} 