/* Court Filing Module Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #1e3a8a; /* Deep Royal Blue */
    --primary-light: #3b82f6;
    --primary-dark: #172554;
    --accent-color: #f59e0b; /* Amber/Gold for premium feel */
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --background-gradient: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
    --input-bg: rgba(255, 255, 255, 0.9);
    --input-border: #d1d5db;
    --radius-lg: 20px;
    --radius-md: 12px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--background-gradient);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: var(--text-color);
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.auth-container {
    /* Increase max-width for better desktop utilization */
    max-width: 1600px;
    background: transparent; /* Removed bg color as requested */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: var(--radius-lg);
    box-shadow: none; /* Removed shadow */
    border: none; /* Removed border */
    margin: 20px;
    display: flex;
    flex-wrap: wrap;
    /* max-height: 90vh;  Removed to allow full form height */
    position: relative;
    /* overflow: hidden; Removed to ensure scrolling works reliably */
    min-height: 80vh; /* Ensure it has substantial presence */
    justify-content: center; /* Center content if needed */
}

/* ... existing styles ... */

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: #fff;
    border-left: 4px solid var(--primary-color);
    padding: 15px 25px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    transform: translateX(120%);
    transition: transform 0.3s ease-in-out;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.success {
    border-left-color: #10b981;
}

.toast-icon {
    font-size: 20px;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast.success .toast-icon {
    color: #10b981;
}

.toast-message {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
}

.auth-left {
    flex: 1;
    padding: 40px 50px;
    display: flex;
    flex-direction: column;
    background: var(--glass-bg); /* Moved glass effect here */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-lg);
    min-width: 320px;
    /* overflow-y: auto; Removed loop scroll */
    height: auto;
    margin-right: 15px; /* Spacing between left/right if side-by-side */
}

.auth-right {
    flex: 1;
    background: url('../../assets/img/hero-bg.jpg') center/cover no-repeat;
    position: relative;
    min-width: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 40px;
    background-color: var(--primary-color);
    border-radius: var(--radius-lg); /* Match radius */
    box-shadow: var(--shadow-soft); /* Match shadow */
    margin-left: 15px; /* Spacing */
}

.auth-right::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.9), rgba(59, 130, 246, 0.8));
    backdrop-filter: blur(2px);
}

.auth-content {
    position: relative;
    z-index: 1;
    text-align: center;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-header {
    margin-bottom: 30px;
    text-align: center;
}

.auth-logo {
    width: 70px;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 15px;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 13px;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    background-color: var(--input-bg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    color: var(--text-color);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.form-control:focus {
    border-color: var(--primary-light);
    outline: none;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 6px rgba(30, 58, 138, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(30, 58, 138, 0.3);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

.btn-primary i {
    font-size: 18px;
}

/* Sections Styling */
.form-section-title {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    color: #fff;
    padding: 8px 25px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
}

#advocateSection, #generalPersonalSection, #practiceSection {
     border: 1px solid rgba(59, 130, 246, 0.2);
     background: rgba(255, 255, 255, 0.4);
     padding: 30px 25px 20px 25px;
     border-radius: var(--radius-md);
     position: relative;
     margin-top: 35px;
     transition: all 0.3s ease;
}

#advocateSection:hover, #generalPersonalSection:hover, #practiceSection:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
}

#advocateSection .form-section-title, 
#generalPersonalSection .form-section-title,
#practiceSection .form-section-title {
    position: absolute;
    top: -18px;
    left: 20px;
    margin: 0;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
    background: rgba(59,130,246,0.05);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    width: fit-content;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--primary-dark);
}

input[type="radio"], input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 18px;
    height: 18px;
    margin: 0;
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    background: #fff;
    padding: 5px;
    border-radius: var(--radius-md);
    border: 1px solid var(--input-border);
}

.captcha-image {
    background: repeating-linear-gradient(45deg, #f3f4f6, #f3f4f6 10px, #e5e7eb 10px, #e5e7eb 20px);
    padding: 10px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 22px;
    letter-spacing: 6px;
    flex: 1;
    text-align: center;
    color: var(--primary-dark);
}

.auth-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
}

.auth-footer a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.auth-footer a:hover::after {
    transform: scaleX(1);
}

/* Scrollbar Styling */
.auth-left::-webkit-scrollbar {
    width: 6px;
}
.auth-left::-webkit-scrollbar-track {
    background: transparent;
}
.auth-left::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    border-radius: 20px;
}

@media (max-width: 768px) {
    .auth-right {
        display: none;
    }
    .auth-left {
        padding: 20px 15px;
    }
    .auth-container {
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
        height: 100%; /* Force full height */
        border: none;
        overflow-y: auto; /* Scroll container itself */
    }
    .auth-title {
        font-size: 24px;
    }
    
    /* Reset Absolute Positioning on Headers for Mobile */
    #advocateSection, #generalPersonalSection, #practiceSection {
        padding-top: 50px; /* Give room for header if absolute, OR reset entirely */
        margin-top: 40px;
    }
    #advocateSection .form-section-title, 
    #generalPersonalSection .form-section-title,
    #practiceSection .form-section-title {
        position: static; /* Stack naturally */
        margin-bottom: 20px;
        display: table; /* Fit content */
    }

    /* Stack grid columns */
    .row {
        flex-direction: column;
        margin-right: 0;
        margin-left: 0;
    }
    .col-md-6, .col-md-4, .col-md-5, .col-md-7, .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
        padding-right: 0;
        padding-left: 0;
    }

    /* Fix Squished Flex Rows (Bar Reg, OTP, Contact) */
    .form-group > div[style*="display: flex"],
    .form-group > div[style*="display:flex"] {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }
    
    /* Make inputs and buttons full width in stacked flex containers */
    .form-group > div[style*="display: flex"] > input,
    .form-group > div[style*="display: flex"] > select,
    .form-group > div[style*="display: flex"] > button,
    .form-group > div[style*="display: flex"] > div {
        width: 100% !important;
        flex: none !important; /* Disable flex-grow/shrink logic */
        margin-left: 0 !important;
    }

    /* Specific fix for Bar Reg Verify button and OTP Verify button */
    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    /* Labels */
    .form-label {
        width: 100% !important;
        margin-bottom: 8px;
    }
}

/* Grid System for Tablet/Desktop */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}
.col-md-6, .col-md-4, .col-md-5, .col-md-7, .col-md-12 {
    position: relative;
    width: 100%;
    padding-right: 10px;
    padding-left: 10px;
}

@media (min-width: 769px) {
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}
