/* Elementor Token Protection Addon Styles */

/* General Protected Content Styles */
.elementor-protected-content-wrapper,
.elementor-protected-section-wrapper,
.elementor-token-auth-wrapper {
    position: relative;
    width: 100%;
}

/* Authentication Form Styles */
.token-auth-form,
.inline-auth-form {
    max-width: 500px;
    margin: 20px auto;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.auth-form-title {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 600;
}

.auth-form-description {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Form Fields */
.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-field input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.form-field input[type="email"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Submit Buttons */
.token-submit-btn,
.section-auth-btn {
    width: 100%;
    background: #0073aa;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.token-submit-btn:hover,
.section-auth-btn:hover {
    background: #005a87;
}

.token-submit-btn:disabled,
.section-auth-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Message Styles */
.auth-message {
    margin-bottom: 20px;
    padding: 12px 15px;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.4;
}

.auth-message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.auth-message-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Success Messages */
.auth-success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.auth-success-message h3,
.auth-success-message h4 {
    margin: 0 0 10px 0;
    color: #155724;
}

/* Protected Content */
.protected-content-area {
    margin-top: 20px;
}

/* Authentication Status */
.auth-status-indicator {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 15px;
    text-align: center;
}

/* User Info */
.gta-user-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.gta-user-info a {
    color: #0073aa;
    text-decoration: none;
    margin-left: 10px;
}

.gta-user-info a:hover {
    text-decoration: underline;
}

/* Protection Placeholder */
.protection-placeholder {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-style: italic;
}

/* Preview Mode Styles */
.protected-content-preview {
    border: 2px dashed #007cba;
    background: #f0f8ff;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.protected-content-preview h4 {
    margin: 0 0 15px 0;
    color: #007cba;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.protection-mode-indicator {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

/* Form Footer */
.auth-form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .token-auth-form,
    .inline-auth-form {
        margin: 10px;
        padding: 20px;
    }
    
    .auth-form-title {
        font-size: 20px;
    }
    
    .form-field input[type="email"],
    .token-submit-btn,
    .section-auth-btn {
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* Animation for form submission */
.token-submit-btn.loading,
.section-auth-btn.loading {
    position: relative;
    color: transparent;
}

.token-submit-btn.loading::after,
.section-auth-btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Hidden state for protected sections */
.elementor-protected-section-wrapper.hidden {
    display: none;
}

/* Elementor Editor Specific Styles */
.elementor-editor .protected-content-preview {
    display: block !important;
}

.elementor-editor .elementor-protected-section-wrapper.hidden {
    display: block !important;
    opacity: 0.5;
}

.elementor-editor .elementor-protected-section-wrapper.hidden::before {
    content: "Hidden in live mode";
    display: block;
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
    text-align: center;
    font-size: 12px;
    margin-bottom: 10px;
}
