/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unsubscribe-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 500px;
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo-section img {
    max-width: 200px;
    height: auto;
}

/* Content Section */
.content-section {
    margin-bottom: 30px;
}

h1 {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    text-align: center;
}

#pageDescription {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Form Styles */
.unsubscribe-form-container {
    width: 100%;
}

.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fff;
}

input[type="email"]:focus {
    outline: none;
    border-color: #0073e6;
    box-shadow: 0 0 0 3px rgba(0, 115, 230, 0.1);
}

input[type="email"]:invalid {
    border-color: #e74c3c;
}

/* Submit Button */
.submit-button {
    width: 100%;
    background: linear-gradient(135deg, #0073e6 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
}

.submit-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 230, 0.3);
}

.submit-button:active:not(:disabled) {
    transform: translateY(0);
}

.submit-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading Spinner */
.spinner {
    width: 16px;
    height: 16px;
    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); }
}

/* Footer */
.footer-section {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

#footerText {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

#footerText a {
    color: #0073e6;
    text-decoration: none;
}

#footerText a:hover {
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 24px 24px 0 24px;
    border-bottom: 1px solid #e1e5e9;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
}

.modal-body {
    padding: 0 24px 20px 24px;
}

.modal-body p {
    margin-bottom: 12px;
    color: #666;
    line-height: 1.5;
}

.modal-footer {
    padding: 20px 24px 24px 24px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-primary {
    background: #0073e6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #0056b3;
}

/* Error States */
.field-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

input.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .unsubscribe-form {
        padding: 30px 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    #pageDescription {
        font-size: 14px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 480px) {
    .unsubscribe-form {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    input[type="email"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* reCAPTCHA styling */
#captchaContainer {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#captchaContainer .g-recaptcha {
    transform: scale(0.95);
    transform-origin: center center;
}

@media (max-width: 480px) {
    #captchaContainer .g-recaptcha {
        transform: scale(0.85);
    }
}
