/**
 * Newsletter Signup Forms & Popup Styles
 * Brand color: #d97a2e (orange)
 */

/* ==========================================================================
   Embedded Signup Form (Shortcode)
   ========================================================================== */

.newsletter-signup-form {
    max-width: 450px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 8px;
    background: #fafafa;
}

.newsletter-signup-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #1a4a5e;
    font-family: "Playfair Display", Georgia, serif;
}

.newsletter-signup-description {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

.newsletter-field {
    margin-bottom: 15px;
}

.newsletter-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.newsletter-input:focus {
    outline: none;
    border-color: #d97a2e;
}

.newsletter-submit-btn {
    width: 100%;
    padding: 14px 20px;
    background: #d97a2e;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: inherit;
}

.newsletter-submit-btn:hover {
    background: #c06a20;
}

.newsletter-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.newsletter-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.newsletter-message.success {
    background: #e8f4e8;
    color: #2d5a2d;
    border: 1px solid #c3dcc3;
}

.newsletter-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Style variations */

.newsletter-style-minimal {
    background: transparent;
    padding: 20px 0;
}

.newsletter-style-minimal .newsletter-input,
.newsletter-style-minimal .newsletter-submit-btn {
    border-radius: 0;
}

.newsletter-style-card {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
}

/* Inline form variation */
.newsletter-signup-form.newsletter-inline .newsletter-signup-form-inner {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.newsletter-signup-form.newsletter-inline .newsletter-field {
    flex: 1;
    margin-bottom: 0;
    min-width: 150px;
}

.newsletter-signup-form.newsletter-inline .newsletter-submit-btn {
    width: auto;
    padding: 12px 30px;
}


/* ==========================================================================
   Popup Overlay
   ========================================================================== */

.newsletter-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.newsletter-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.newsletter-popup-container {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.newsletter-popup-overlay.active .newsletter-popup-container {
    transform: scale(1);
}

.newsletter-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    color: #333;
    transition: background-color 0.2s ease;
}

.newsletter-popup-close:hover {
    background: white;
}

.newsletter-popup-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.newsletter-popup-image-default {
    background: linear-gradient(135deg, #65c2de 0%, #1a4a5e 100%);
}

.newsletter-popup-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 25px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    color: white;
}

.newsletter-popup-title {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-family: "Playfair Display", Georgia, serif;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.newsletter-popup-description {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
    line-height: 1.4;
}

.newsletter-popup-form-container {
    padding: 25px;
}

.newsletter-popup-field {
    margin-bottom: 12px;
}

.newsletter-popup-field-inline {
    display: flex;
    gap: 10px;
}

.newsletter-popup-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
}

.newsletter-popup-input:focus {
    outline: none;
    border-color: #d97a2e;
}

.newsletter-popup-submit {
    padding: 12px 25px;
    background: #d97a2e;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.newsletter-popup-submit:hover {
    background: #c06a20;
}

.newsletter-popup-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.newsletter-popup-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.newsletter-popup-message.success {
    background: #e8f4e8;
    color: #2d5a2d;
    border: 1px solid #c3dcc3;
}

.newsletter-popup-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ==========================================================================
   Subscription Page Styles (for standalone subscription pages)
   ========================================================================== */

.newsletter-subscription-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.newsletter-subscription-page .newsletter-signup-form {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 600px) {
    .newsletter-popup-container {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .newsletter-popup-image {
        height: 150px;
    }
    
    .newsletter-popup-title {
        font-size: 18px;
    }
    
    .newsletter-popup-field-inline {
        flex-direction: column;
    }
    
    .newsletter-popup-submit {
        width: 100%;
    }
    
    .newsletter-signup-form {
        padding: 20px;
    }
}


/* ==========================================================================
   Subscriber Content Gate
   ========================================================================== */

.subscriber-content-locked {
    margin: 30px 0;
}

.subscriber-gate {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.subscriber-gate-title {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: #1a4a5e;
    font-family: "Playfair Display", Georgia, serif;
}

.subscriber-gate-message {
    margin: 0 0 25px 0;
    color: #555;
    font-size: 16px;
    line-height: 1.6;
}

.subscriber-gate-form {
    max-width: 320px;
    margin: 0 auto;
}

.subscriber-gate-field {
    margin-bottom: 12px;
}

.subscriber-gate-field-inline {
    display: flex;
    gap: 10px;
}

.subscriber-gate-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.subscriber-gate-input:focus {
    outline: none;
    border-color: #d97a2e;
}

.subscriber-gate-btn {
    width: 100%;
    padding: 14px 20px;
    background: #d97a2e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: inherit;
}

.subscriber-gate-btn:hover {
    background: #c06a20;
}

.subscriber-gate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.subscriber-gate-message,
.subscriber-login-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

.subscriber-gate-message.success,
.subscriber-login-message.success {
    background: #e8f4e8;
    color: #2d5a2d;
    border: 1px solid #c3dcc3;
}

.subscriber-gate-message.error,
.subscriber-login-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.subscriber-gate-login {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.subscriber-gate-login p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
}

.subscriber-login-toggle {
    color: #d97a2e;
    text-decoration: none;
    font-weight: 500;
}

.subscriber-login-toggle:hover {
    text-decoration: underline;
}

.subscriber-login-form {
    max-width: 320px;
    margin: 0 auto;
}

.subscriber-login-btn {
    width: auto;
    padding: 12px 20px;
    white-space: nowrap;
}

.subscriber-content-unlocked {
    /* No special styling needed - just shows the content */
}

@media (max-width: 600px) {
    .subscriber-gate {
        padding: 25px 20px;
    }
    
    .subscriber-gate-title {
        font-size: 20px;
    }
    
    .subscriber-gate-field-inline {
        flex-direction: column;
    }
    
    .subscriber-login-btn {
        width: 100%;
    }
}
