/**
 * Magic Link Protection - Styles
 * Color scheme matching #D51C1D header
 */

/* Form Container - Fill available space */
.mlp-access-form-container {
    width: 100% !important;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

/* Form Header - Full width */
.mlp-form-header {
    background: linear-gradient(135deg, #D51C1D 0%, #B01818 100%);
    color: white;
    padding: 25px;
    text-align: center;
    border-radius: 8px 8px 0 0;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

.mlp-form-header h3,
.mlp-header-title {
    margin: 0 0 10px 0 !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    color: white !important;
    background: none !important;
    padding: 0 !important;
}

.mlp-form-header p,
.mlp-header-subtitle {
    margin: 0 !important;
    opacity: 0.95;
    font-size: 14px !important;
    color: white !important;
    background: none !important;
    padding: 0 !important;
}

/* Form Body - Full width */
.mlp-form {
    padding: 0;
    background: transparent;
    width: 100% !important;
    box-sizing: border-box;
}

/* Process Info - Simplified */
.mlp-process-info {
    background: #f8f9fa;
    border-left: 4px solid #D51C1D;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 5px;
    width: 100% !important;
    box-sizing: border-box;
}

.mlp-process-info h4 {
    margin: 0 0 10px 0;
    color: #D51C1D;
    font-size: 16px;
    font-weight: 600;
}

.mlp-process-info ol {
    margin: 0;
    padding-left: 20px;
    list-style-type: decimal;
}

.mlp-process-info li {
    margin-bottom: 5px;
    color: #555;
    font-size: 14px;
    line-height: 1.4;
}

.mlp-process-info li strong {
    color: #333;
    font-weight: 600;
}

/* Form Groups - Full width */
.mlp-form-group {
    margin-bottom: 25px;
    width: 100% !important;
}

.mlp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.mlp-form-group input[type="email"] {
    width: 100% !important;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 5px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.mlp-form-group input[type="email"]:focus {
    outline: none;
    border-color: #D51C1D;
    box-shadow: 0 0 0 3px rgba(213, 28, 29, 0.1);
}

.mlp-help-text {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Submit Button - Full width */
.mlp-submit-btn {
    width: 100% !important;
    padding: 15px 30px;
    background: linear-gradient(135deg, #D51C1D 0%, #B01818 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(213, 28, 29, 0.3);
    box-sizing: border-box;
}

.mlp-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(213, 28, 29, 0.4);
}

.mlp-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.mlp-message {
    padding: 15px;
    margin-top: 20px;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.6;
}

.mlp-message.mlp-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

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

/* Help Section - Full width */
.mlp-help-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
    text-align: center;
    width: 100% !important;
    box-sizing: border-box;
}

.mlp-help-section p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.mlp-help-section a {
    color: #D51C1D;
    text-decoration: none;
    font-weight: 600;
}

.mlp-help-section a:hover {
    text-decoration: underline;
}

/* Security Notice - Full width */
.mlp-security-notice {
    background: #e8f4fd;
    border: 1px solid #bee5eb;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    width: 100% !important;
    box-sizing: border-box;
}

.mlp-security-notice p {
    margin: 0;
    font-size: 13px;
    color: #0c5460;
    line-height: 1.6;
}

/* Access Info Bar - Logged in display */
.mlp-access-info {
    margin-bottom: 30px;
    width: 100%;
}

.mlp-access-bar {
    background: linear-gradient(135deg, #D51C1D 0%, #B01818 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(213, 28, 29, 0.2);
    width: 100%;
    box-sizing: border-box;
}

.mlp-access-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.mlp-access-right {
    display: flex !important;
    align-items: center;
}

.mlp-user-info,
.mlp-expiry-info {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
}

.mlp-user-info strong,
.mlp-expiry-info strong {
    font-weight: 600;
    color: white;
}

.mlp-icon {
    font-style: normal;
    display: inline-block;
}

/* Logout Button - High visibility white button */
.mlp-logout-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: white !important;
    color: #D51C1D !important;
    padding: 10px 20px !important;
    border-radius: 5px !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    border: 2px solid white !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
    cursor: pointer !important;
    text-transform: none !important;
    line-height: normal !important;
}

.mlp-logout-btn:hover {
    background: #f8f9fa !important;
    color: #B01818 !important;
    transform: translateY(-1px) !important;
    text-decoration: none !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25) !important;
}

.mlp-logout-btn:focus {
    outline: 2px solid white !important;
    outline-offset: 2px !important;
}

.mlp-logout-text {
    font-weight: 600 !important;
    display: inline !important;
}

.mlp-logout-icon {
    font-size: 20px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    display: inline !important;
}

/* Protected Content Messages - Full width */
.mlp-access-required,
.mlp-access-expired {
    width: 100% !important;
    margin: 0;
    padding: 0;
    text-align: center;
}

.mlp-message-box {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
    border: none !important;
}

.mlp-message-box h3 {
    color: #D51C1D;
    font-size: 24px;
    margin: 0 0 20px 0;
}

.mlp-message-box p {
    color: #555;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.mlp-message-box.mlp-error h3 {
    color: #dc3545;
}

/* Protected Content Wrapper */
.mlp-protected-content {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mlp-access-form-container {
        width: 100%;
        margin: 0;
    }
    
    .mlp-form {
        padding: 0;
    }
    
    .mlp-form-header {
        padding: 20px;
    }
    
    .mlp-form-header h3 {
        font-size: 20px;
    }
    
    .mlp-access-bar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .mlp-access-left {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    .mlp-access-right {
        width: 100%;
        justify-content: center;
    }
    
    .mlp-logout-btn {
        padding: 8px 20px;
    }
    
    .mlp-process-info {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .mlp-access-form-container {
        width: 100%;
        margin: 0;
    }
    
    .mlp-form {
        padding: 0;
    }
    
    .mlp-form-header {
        padding: 15px;
        border-radius: 6px 6px 0 0;
    }
    
    .mlp-form-header h3 {
        font-size: 18px;
    }
    
    .mlp-access-left {
        flex-direction: column;
        gap: 10px;
    }
    
    .mlp-submit-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Loading Spinner */
.mlp-spinner {
    display: inline-block;
}

/* Body Classes for Protected Pages */
body.mlp-protected-page {
    /* Add any specific styles for protected pages */
}

body.mlp-has-access {
    /* Styles when user has access */
}

body.mlp-no-access {
    /* Styles when user doesn't have access */
}

/* Admin Notice Styles (if needed) */
.mlp-admin-notice {
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid #D51C1D;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.mlp-admin-notice h4 {
    margin: 0 0 10px 0;
    color: #D51C1D;
}

/* Print Styles */
@media print {
    .mlp-access-bar,
    .mlp-access-form-container,
    .mlp-help-section,
    .mlp-security-notice {
        display: none !important;
    }
}