/**
 * Navigation Styles - Unified across all pages
 * Based on homepage navigation from components.css
 * 
 * @package LMS_Theme
 */

/* Modal Open Body */
body.modal-open {
    overflow: hidden;
}

/* Search Modal */
.lms-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lms-search-modal.active {
    opacity: 1;
    visibility: visible;
}

.lms-search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.lms-search-modal-content {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.lms-search-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: #66756C;
}

.lms-search-form {
    display: flex;
    gap: 16px;
    align-items: center;
}

.lms-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #E9E3D9;
    border-radius: 8px;
    font-size: 16px;
}

.lms-search-input:focus {
    outline: none;
    border-color: #2E7D32;
}

.lms-search-submit {
    background: #2E7D32;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.15s ease;
}

.lms-search-submit:hover {
    background: #1B5E20;
}

/* Responsive Design - Moved to responsive.css */

/* ==========================================================================
   Modal Styles (Merged from modals.css)
   ========================================================================== */

.lms-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lms-modal[inert] {
    pointer-events: none;
}

.lms-modal.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.lms-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lms-modal-container {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    max-width: 480px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Header */
.lms-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--lms-gray-200);
}

.lms-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lms-gray-900);
    margin: 0;
}

.lms-modal-close {
    background: none;
    border: none;
    color: #adb5bd;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    outline: none;
}

.lms-modal-close:hover {
    background: #FAF6F0;
    color: #495057;
}

.lms-modal-close:focus {
    outline: 2px solid #2E7D32;
    outline-offset: 2px;
}

/* Modal Body */
.lms-modal-body {
    padding: 20px;
}

/* Modal Footer */
.lms-modal-footer {
    padding: 20px 30px 30px;
    text-align: center;
    border-top: 1px solid var(--lms-gray-200);
}

.lms-modal-footer p {
    margin: 0;
    color: var(--lms-gray-600);
    font-size: 0.875rem;
}

.lms-switch-modal {
    color: #2E7D32;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.lms-switch-modal:hover {
    color: #1B5E20;
    text-decoration: none;
}

/* Form Styles */
.lms-auth-form {
    margin-bottom: 30px;
}

.lms-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Modal form rows - Higher specificity to override contact.css */
.lms-modal .lms-form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
}

.lms-form-group {
    margin-bottom: 12px;
}


.lms-form-row .lms-form-group {
    margin-bottom: 0;
}

/* Form Labels */
.lms-form-label {
    display: none; /* Hidden for modal forms */
}

/* Contact form labels */
.lms-form-group label {
    display: block;
    font-weight: 600;
    color: #222222;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.lms-form-input {
    width: 100%;
    max-width: 100%;
    padding: 15px;
    border: 2px solid #E9E3D9;
    border-radius: 10px;
    font-size: 0.9rem; /* Reduced font-size */
    line-height: 1.4;
    color: #495057;
    background-color: #FAF6F0;
    transition: border-color 0.3s ease;
    box-shadow: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}

/* Modal form inputs - Higher specificity to override page-specific styles */
.lms-modal .lms-form-input,
.lms-modal .lms-form-textarea,
.lms-modal input[type="text"],
.lms-modal input[type="email"],
.lms-modal input[type="password"],
.lms-modal input[type="tel"],
.lms-modal textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 15px !important;
    border: 2px solid #E9E3D9 !important;
    border-radius: 10px !important;
    font-size: 0.9rem !important; /* Reduced font-size */
    line-height: 1.4 !important;
    color: #495057 !important;
    background-color: #FAF6F0 !important;
    transition: border-color 0.3s ease !important;
    box-shadow: none !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    box-sizing: border-box !important;
}

.lms-form-input:focus {
    outline: none;
    border-color: #2E7D32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
    background-color: #FFFFFF;
}

/* Modal form inputs focus state - Higher specificity */
.lms-modal .lms-form-input:focus,
.lms-modal input[type="text"]:focus,
.lms-modal input[type="email"]:focus,
.lms-modal input[type="password"]:focus,
.lms-modal input[type="tel"]:focus,
.lms-modal textarea:focus {
    outline: none !important;
    border-color: #2E7D32 !important;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1) !important;
    background-color: #FFFFFF !important;
}

.lms-form-input:invalid {
    border-color: #dc3545;
}

.lms-form-input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Forgot Password Link */
.lms-forgot-password {
    font-size: 14px;
    color: #2E7D32;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 4px 0;
    white-space: nowrap;
    align-self: center;
}

.lms-forgot-password:hover {
    color: #1B5E20;
    text-decoration: underline;
    transform: translateY(-1px);
}

/* Password Input */
.lms-password-input {
    position: relative;
    width: 100%;
}

.lms-password-input .lms-form-input {
    padding-right: 40px;
}

.lms-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #adb5bd;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.lms-password-toggle:hover {
    color: #495057;
}

/* Checkbox */
.lms-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--lms-gray-700);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 4px 0;
    line-height: 1.4;
}

.lms-checkbox-label:hover {
    color: var(--lms-gray-900);
}

.lms-checkbox-custom {
    display: none; /* Hide custom checkbox, use native checkbox */
}

.lms-checkbox-label input[type="checkbox"] {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin: 0;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #2E7D32; /* Modern browser checkbox color */
}

/* Links inside checkbox labels */
.lms-checkbox-label a {
    color: #2E7D32;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.lms-checkbox-label a:hover {
    color: #1B5E20;
    border-bottom-color: #1B5E20;
    transform: translateY(-1px);
}

/* Password Strength */
.lms-password-strength {
    margin-top: 8px;
    height: 4px;
    background: var(--lms-gray-200);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.lms-password-strength::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #D84315;
    transition: all 0.3s ease;
}

.lms-password-strength.weak::after {
    width: 25%;
    background: #D84315;
}

.lms-password-strength.fair::after {
    width: 50%;
    background: #D84315;
}

.lms-password-strength.good::after {
    width: 75%;
    background: #2E7D32;
}

.lms-password-strength.strong::after {
    width: 100%;
    background: #2E7D32;
}

/* Button Styles - Updated with modals.css styles */
.lms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: none;
}

.lms-btn:focus {
    outline: 0;
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.25);
}

.lms-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.lms-btn-primary {
    color: #FFFFFF;
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
    border-color: #2E7D32;
}

.lms-btn-primary:hover {
    color: #FFFFFF;
    background: linear-gradient(135deg, #1B5E20 0%, #0D3E0F 100%);
    border-color: #1B5E20;
    text-decoration: none;
}

.lms-btn-outline {
    color: #2E7D32;
    background-color: transparent;
    border-color: #2E7D32;
}

.lms-btn-outline:hover {
    color: #FFFFFF;
    background-color: #2E7D32;
    border-color: #2E7D32;
    text-decoration: none;
}

.lms-btn-full {
    width: 100%;
    justify-content: center;
}

.lms-btn-loading {
    display: none;
}

.lms-btn.loading .lms-btn-text {
    display: none;
}

.lms-btn.loading .lms-btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Social Login Buttons */
.lms-social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lms-btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border: 2px solid #E9E3D9;
    background: #FFFFFF;
    color: #495057;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lms-btn-social:hover {
    border-color: var(--lms-gray-300);
    background: var(--lms-gray-50);
    color: var(--lms-gray-800);
}

.lms-btn-google:hover {
    border-color: #db4437;
    color: #db4437;
}

.lms-btn-facebook:hover {
    border-color: #4267B2;
    color: #4267B2;
}

/* Form Messages */
.lms-form-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    display: none;
    word-wrap: break-word;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

/* Force show when has content */
.lms-form-message:not(:empty) {
    display: block !important;
}

.lms-form-message.show {
    opacity: 1;
    transform: translateY(0);
}

.lms-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.lms-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.lms-form-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    display: block;
}

/* Divider */
.lms-auth-divider {
    position: relative;
    text-align: center;
    margin: 30px 0;
}

.lms-auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--lms-gray-200);
}

.lms-auth-divider span {
    background: #FFFFFF;
    padding: 0 20px;
    color: #adb5bd;
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

/* Modal Responsive Design */
@media (max-width: 1024px) {
    .lms-modal-container {
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    .lms-modal-container {
        max-width: 95%;
    }
}

@media (max-width: 768px) {
    .lms-modal-overlay {
        padding: 10px;
    }
    
    .lms-modal-container {
        max-width: 100%;
        border-radius: 15px;
    }
    
    .lms-modal-header {
        padding: 20px 20px 15px;
    }
    
    .lms-modal-title {
        font-size: 1.5rem;
    }
    
    .lms-modal-body {
        padding: 20px;
    }
    
    .lms-modal-footer {
        padding: 15px 20px 20px;
    }
    
    /* Form inputs responsive */
    .lms-form-input {
        padding: 13px;
        font-size: 0.85rem; /* Reduced font-size */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .lms-modal .lms-form-input,
    .lms-modal .lms-form-textarea {
        padding: 13px !important;
        font-size: 0.85rem !important; /* Reduced font-size */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Form messages responsive */
    .lms-form-message {
        padding: 10px 12px;
        font-size: 0.8rem;
        margin-top: 12px;
    }
    
    .lms-form-row {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    /* Form row responsive - Copy from contact.css */
    .lms-form-row {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    /* Modal form rows responsive - Higher specificity */
    .lms-modal .lms-form-row {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .lms-social-login {
        gap: 10px;
    }
    
    .lms-btn-social {
        padding: 10px 16px;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .lms-modal-overlay {
        padding: 5px;
    }
    
    .lms-modal-container {
        border-radius: 10px;
    }
    
    .lms-modal-header {
        padding: 15px 15px 10px;
    }
    
    .lms-modal-body {
        padding: 15px;
    }
    
    .lms-modal-footer {
        padding: 10px 15px 15px;
    }
    
    .lms-form-input {
        padding: 12px;
        font-size: 0.8rem; /* Reduced font-size */
        border-radius: 8px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .lms-modal .lms-form-input,
    .lms-modal .lms-form-textarea {
        padding: 12px !important;
        font-size: 0.8rem !important; /* Reduced font-size */
        border-radius: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Form messages responsive for mobile */
    .lms-form-message {
        padding: 8px 10px;
        font-size: 0.75rem;
        margin-top: 10px;
        line-height: 1.3;
    }
    
    /* Form row responsive for mobile - Copy from contact.css */
    .lms-form-row {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    /* Modal form rows responsive for mobile - Higher specificity */
    .lms-modal .lms-form-row {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
}

/* ==========================================================================
   Icon Styles
   ========================================================================== */

.lms-icon-user,
.lms-icon-arrow-down,
.lms-icon-dashboard,
.lms-icon-book,
.lms-icon-settings,
.lms-icon-logout,
.lms-icon-search {
    display: inline-block;
    width: 16px;
    height: 16px;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.lms-icon-user::before {
    content: "👤";
    font-size: 16px;
}

.lms-icon-arrow-down::before {
    content: "▼";
    font-size: 12px;
}

.lms-icon-dashboard::before {
    content: "📊";
    font-size: 16px;
}

.lms-icon-book::before {
    content: "📚";
    font-size: 16px;
}

.lms-icon-settings::before {
    content: "⚙️";
    font-size: 16px;
}

