/* assets/css/modern-ui.css - Refined + Stepper */

/* Import Google Fonts - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Reset & Base */
body {
    background: #f0f2f5 !important;
    /* Soft gray for modern feel */
    font-family: 'Poppins', sans-serif !important;
    color: #444;
}

/* 
   --------------------------------------------------
   Layout: Modern Card Design 
   --------------------------------------------------
*/
.register {
    background: #ffffff !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 5% !important;
    margin-bottom: 5% !important;
    padding: 0 !important;
    /* Remove internal padding of container for full-width splash on left */
    overflow: hidden;
    /* For rounded corners on child elements */
    max-width: 1200px;
    /* Wider for modern screens */
}

/* Sidebar / Left Panel */
.register-left {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
    /* Premium Blue Gradient */
    padding: 50px 30px !important;
    margin-top: 0 !important;
    min-height: 100%;
    /* Full height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white !important;
}

.register-left img {
    margin-top: 0 !important;
    width: 60% !important;
    /* Better logo size */
    margin-bottom: 20px !important;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.register-left h4 {
    font-weight: 700 !important;

    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.register-left p {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 20px !important;
    margin-top: 10px !important;
    font-size: 0.9em !important;
}

/* Sidebar Links as Pills */
.register-left a {
    display: inline-block;
    padding: 8px 16px;
    margin: 5px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: white !important;
    text-decoration: none !important;
    font-size: 0.85em;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.register-left a:hover {
    background: white;
    color: #1e3c72 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Content Area */
.register-right {
    background: #fff !important;
    padding: 40px !important;
    border-radius: 0 !important;
    /* Reset border radius as container handles it */
}

/* Override Inline Styles for Background Colors in Family Tabs to be softer or cleaner */
/* We target them by specificity to override the inline style (needs !important) */
#famo .col-md-6,
#guspo .col-md-6 {
    background-color: transparent !important;
    /* Remove the hardcoded colors for a cleaner look */
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Re-add subtle visual distinction via borders/shadows if needed */
#famo .col-md-6:first-child {
    border-left: 4px solid #1e3c72;
}

#famo .col-md-6:last-child {
    border-left: 4px solid #c12035;
}


/* 
   --------------------------------------------------
   Stepper UI (Replaces Tabs)
   --------------------------------------------------
*/
.stepper-wrapper {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
    padding: 0 20px;
}

.stepper-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    /* z-index: 2; */
    cursor: pointer;
    /* Clickable */
}

.stepper-item::before {
    position: absolute;
    content: "";
    border-bottom: 2px solid #e0e0e0;
    width: 100%;
    top: 20px;
    left: -50%;
    z-index: 1;
}

.stepper-item::after {
    position: absolute;
    content: "";
    border-bottom: 2px solid #e0e0e0;
    width: 100%;
    top: 20px;
    left: 50%;
    z-index: 1;
}

.stepper-item .step-counter {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eee;
    margin-bottom: 10px;
    color: #666;
    font-weight: 700;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stepper-item.active .step-counter {
    background-color: #1e3c72;
    /* User Active Color */
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(30, 60, 114, 0.3);
}

.stepper-item.completed .step-counter {
    background-color: #2a5298;
    /* Completed Color */
    color: #fff;
}

.stepper-item.completed::after,
.stepper-item.active::before {
    border-bottom: 2px solid #2a5298;
    /* Completed Line */
}

.stepper-item:first-child::before {
    content: none;
}

.stepper-item:last-child::after {
    content: none;
}

.stepper-item .step-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stepper-item.active .step-name {
    color: #1e3c72;
    font-weight: 700;
}

.stepper-item.completed .step-name {
    color: #2a5298;
}

/* Hide original tabs but keep structure for JS */
.nav-tabs {
    opacity: 0;
    height: 0;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Sub-tabs (Inner tabs for Family/Basic) - These should remain visible but styled as pills */
/* We need to target them specifically. They have ID #myTab2 or inside .tab-pane */
.tab-pane .nav-tabs {
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    display: flex !important;
    margin-bottom: 20px !important;
}

/* Re-apply pill styling to inner tabs */
.tab-pane .nav-tabs .nav-link {
    border-radius: 50px !important;
    padding: 8px 20px !important;
    margin-right: 5px;
    border: 1px solid rgba(30, 60, 114, 0.3) !important;
    /* Semi-transparent border */
}

.tab-pane .nav-tabs .nav-link.active {
    background-color: #1e3c72 !important;
    color: white !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}


/* 
   --------------------------------------------------
   Headings & Text
   --------------------------------------------------
*/
.register-heading {
    text-align: left !important;
    /* Left align for cleaner look */
    color: #1e3c72 !important;
    font-weight: 700 !important;
    font-size: 1.8rem !important;
    margin-bottom: 30px !important;
    position: relative;
    padding-bottom: 10px;
}

.register-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background: #c12035;
    /* Accent Color */
    border-radius: 2px;
}

.text-small {
    text-transform: uppercase;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: #8898aa !important;
    letter-spacing: 0.5px;
    margin-bottom: 5px !important;
    display: block;
}

/* 
   --------------------------------------------------
   Forms & Inputs
   --------------------------------------------------
*/
.form-group,
.mb-3 {
    margin-bottom: 20px !important;
}

.form-control {
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    /* Rounded corners */
    padding: 15px 15px !important;
    /* Taller inputs */
    height: auto !important;
    /* Let padding define height */
    font-size: 0.95rem !important;
    background: #fcfcfc !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
}

.form-control:focus {
    background: #fff !important;
    border-color: #1e3c72 !important;
    box-shadow: 0 0 0 4px rgba(30, 60, 114, 0.1) !important;
    /* Focus ring */
}

/* Specific override for the "Start Here" select which has inline style */
#selstt {
    width: 100% !important;
    /* Force full width despite inline style */
    display: block !important;
    height: 60px !important;
    font-size: 1.2rem !important;
    font-weight: 600;
    color: #1e3c72;
    border: 2px solid #1e3c72 !important;
}


/* Select inputs specific styling */
select.form-control {
    padding: 12px 15px !important;
    /* Adjust for select height */
    min-height: 50px !important;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.762L10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Floating labels effect (Pseudo-mockup) */
/* We can't change HTML structure easily, so we rely on label styling above input */

/* 
   --------------------------------------------------
   Buttons
   --------------------------------------------------
*/
.btnRegister {
    float: right;
    margin-top: 20px;
    border: none;
    border-radius: 50px !important;
    /* Pill shape */
    padding: 12px 40px !important;
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%) !important;
    color: #fff;
    font-weight: 600 !important;
    font-size: 1rem !important;
    width: auto !important;
    /* Auto width instead of fixed 50% */
    min-width: 150px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
    transition: all 0.3s ease;
}

.btnRegister:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.4);
    background: linear-gradient(90deg, #162f5f 0%, #1f407a 100%) !important;
}

/* Back/Prev/Next buttons if any other classes used */
.btn-warning {
    background: #c12035 !important;
    /* Red accent */
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(193, 32, 53, 0.3);
}

.btn-info {
    background: #17a2b8 !important;
    /* Info cyan */
    color: white !important;
}

/* 
   --------------------------------------------------
   Modals
   --------------------------------------------------
*/
.modal-content {
    border-radius: 15px !important;
    border: none !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2) !important;
}

.modal-header {
    border-bottom: 1px solid #eee !important;
    padding: 20px 25px !important;
    background: #f8f9fa;
    border-radius: 15px 15px 0 0;
}

.modal-title {
    font-weight: 700 !important;
    color: #333 !important;
}

.modal-body {
    padding: 25px !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
    color: #555 !important;
}

[data-bs-theme="dark"] .modal-body {
    color: #9e9e9e !important;
}

.modal-backdrop.show {
    /* BS5 uses .show instead of .in */
    opacity: 0.5 !important;
    /* Clean blur effect */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background-color: rgba(30, 60, 114, 0.6) !important;
}

/* 
   --------------------------------------------------
   Data Lists and Dropdowns
   --------------------------------------------------
*/
datalist {
    font-family: 'Poppins', sans-serif;
}

/* 
   --------------------------------------------------
   Utility & Helpers 
   --------------------------------------------------
*/
/* Enhance alerts */
.alert {
    border-radius: 10px !important;
    border: none !important;
    padding: 15px 20px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.alert-info {
    background-color: #e3f2fd !important;
    color: #0d47a1 !important;
    border-left: 4px solid #0d47a1 !important;
}

.alert-warning {
    background-color: #fff3e0 !important;
    color: #e65100 !important;
    border-left: 4px solid #e65100 !important;
}

/* File Upload Preview */
.imgcl {
    border-radius: 10px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px dashed #ccc;
    padding: 5px;
    max-height: 250px !important;
    /* Restrict height */
    max-width: 100% !important;
    /* Ensure it fits container */
    margin: 10px auto !important;
    /* Center it */
    display: block !important;
    object-fit: contain;
    /* Maintain aspect ratio */
}

/* Loading Overlay */
.blockMsg {
    background: white !important;
    color: #333 !important;
    border-radius: 15px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    font-family: 'Poppins', sans-serif !important;
}

/* Progress bar in loading overlay */
.progress {
    height: 10px !important;
    border-radius: 5px !important;
    background-color: #e9ecef !important;
    margin-top: 10px;
}

.progress-bar {
    background-color: #1e3c72 !important;
    transition: width .6s ease;
}

/* Fix for disabled inputs looking too washed out */
input:disabled,
select:disabled {
    background-color: #f0f0f0 !important;
    color: #888 !important;
}

/* Mobile Responsiveness fixes */
@media (max-width: 768px) {
    .register {
        margin-top: 10px !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .register-left {
        padding: 30px 15px !important;
        border-radius: 0 !important;
    }

    .register-right {
        padding: 20px !important;
    }

    /* On mobile, Stepper items text might need to be smaller */
    .stepper-item .step-name {
        font-size: 0.7rem;
    }

    .btnRegister {
        width: 100% !important;
        margin-top: 30px;
        float: none;
    }
}

/* 
   --------------------------------------------------
   Dark Mode Support 
   --------------------------------------------------
*/
[data-bs-theme="dark"] body {
    background: #121212 !important;
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .register {
    background: #1e1e1e !important;
    border-color: #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] .register-right {
    background: #1e1e1e !important;
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #2d2d2d !important;
    border-color: #444 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .form-control:focus {
    background-color: #333 !important;
    border-color: #1e3c72 !important;
}

[data-bs-theme="dark"] .stepper-item .step-counter {
    background-color: #333 !important;
    border-color: #444 !important;
    color: #aaa !important;
}

[data-bs-theme="dark"] .stepper-item.active .step-counter {
    background-color: #1e3c72 !important;
    color: #fff !important;
    border-color: #fff !important;
}

[data-bs-theme="dark"] .stepper-item.completed .step-counter {
    background-color: #2a5298 !important;
}

[data-bs-theme="dark"] .modal-content {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .modal-header {
    border-bottom-color: #333 !important;
    background-color: #252525 !important;
}

[data-bs-theme="dark"] .modal-title {
    color: #fff !important;
}

[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

[data-bs-theme="dark"] input::placeholder {
    color: #888 !important;
}

[data-bs-theme="dark"] .tab-pane .nav-tabs .nav-link {
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #bbb !important;
}

[data-bs-theme="dark"] .tab-pane .nav-tabs .nav-link.active {
    background-color: #1e3c72 !important;
    color: white !important;
}

[data-bs-theme="dark"] .register-heading {
    color: #64b5f6 !important;
    /* Lighter blue for dark mode */
}

[data-bs-theme="dark"] .text-muted {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ccc' d='M6 8.825L1.175 4 2.238 2.938 6 6.7l3.763-3.762L10.825 4z'/%3E%3C/svg%3E");
}

/* Offcanvas Styling */
/* Default (Light Mode) - Ensure buttons are dark text/border */
/* Offcanvas Styling */
/* Default (Light Mode) - Ensure buttons are dark text/border */
.offcanvas .btn.btn-outline-dark {
    color: #212529 !important;
    border-color: #212529 !important;
}

.offcanvas .btn.btn-outline-dark:hover {
    color: #fff !important;
    background-color: #212529 !important;
    border-color: #212529 !important;
}

/* Offcanvas Dark Mode */
[data-bs-theme="dark"] .offcanvas {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .offcanvas .btn-outline-dark {
    color: #fff !important;
    border-color: #f8f9fa !important;
}

[data-bs-theme="dark"] .offcanvas .btn-outline-dark:hover {
    background-color: #f8f9fa !important;
    color: #000 !important;
}

/* Select2 Dark Mode Overrides */
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection {
    background-color: #2b2b2b !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection__rendered {
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown {
    background-color: #2b2b2b !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-search__field {
    background-color: #1e1e1e !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: #1e3c72 !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option[aria-selected="true"] {
    background-color: #333 !important;
    color: #fff !important;
}