/* =============================================================================
   PHYSICIANTRACK – PRODUCTION CSS
   Cleaned • Consolidated • Responsive • Sidebar–Aware
   ========================================================================== */

/* Root Variables ----------------------------------------------------------- */
:root {
    --accent-color: #28a745;
    --danger-background-color: #f8d7da;
    --danger-color: #721c24;
    --highlight-color: #ffc107;
    --info-icon-color: #004085;
    --info-icon-hover-color: #0056b3;
    --link_hover_color: #28a745;
    --neutral-color: #f8f9fa;
    --phone-hover-color: #004085;
    --placeholder-color: #6c757d;
    --primary-color: #004085;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --success-hover-color: #218838;
    --table-stripe-color: rgba(89,106,157,0.34);
    --text-color: #343a40;
    --th-color: white;
    --warning-hover-color: #e0a800;

    /* Sidebar width for all layouts */
    --sidebar-width: 150px;
}

/* Document + Typography ---------------------------------------------------- */
html { font-size: 0.875rem; }
body {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 0.875rem;
    background-color: var(--neutral-color);
    color: var(--text-color);
    min-height: 75rem;
    padding-top: 2rem;
    margin: 0;
}

h1, h2, h3, h4, h5, h6 { color: var(--primary-color); }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; font-weight: bold; text-align: center; margin-top: 1rem !important; }

/* Alerts ------------------------------------------------------------------ */
.alert { padding: 25px; border-radius: 4px; margin-bottom: 20px; font-size: 16px; }
.alert-success { background: rgba(185,247,185,0.8); color: #4CAF50; border-left: 4px solid #4CAF50; }
.alert-warning { background: rgba(242,211,161,0.9); color: #FFC107; border-left: 4px solid #FFC107; }
.alert-error   { background: rgba(243,159,153,0.96); color: #F44336; border-left: 4px solid #F44336; }
.alert-info    { background: rgba(133,195,246,0.99); color: #2196F3; border-left: 4px solid #2196F3; }

/* Buttons ----------------------------------------------------------------- */
.btn {
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all .3s ease;
}
.btn-primary { background: var(--primary-color); color: white; border: none; }
.btn-primary:hover { background: var(--secondary-color); }
.btn-success { background: var(--success-color); color: white; }
.btn-success:hover { background: var(--success-hover-color); }
.btn-danger { background: var(--danger-color); color: white; }
.btn-outline-secondary {
    border: 1px solid #6c757d; color: #6c757d; background: none;
    padding: .75rem 1.5rem; border-radius: 8px;
}
.btn-outline-secondary:hover { background: #e9ecef; }

/* Cards ------------------------------------------------------------------- */
.card {
    background: var(--neutral-color);
    border: 1px solid var(--secondary-color);
    padding: 1.5rem;
    overflow-wrap: anywhere;
    box-sizing: border-box;
}

/* Tables ------------------------------------------------------------------ */
.table { width: 100%; border-collapse: collapse; }
.table thead th {
    background: var(--primary-color);
    color: var(--th-color) !important;
    text-align: center;
    padding: 10px;
    position: sticky;
    top: 32px;
    z-index: 10;
}
.table-striped tbody tr:nth-of-type(odd) { background: var(--table-stripe-color); }

/* Pagination --------------------------------------------------------------- */
.paginator-wrapper {
    display: flex; align-items: center; padding: .5rem 0;
    position: sticky; bottom: 0; background: white;
    border-top: 1px solid #ddd;
}

/* Forms ------------------------------------------------------------------- */
form {
    background: white;
    border-radius: 10px;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}
form label {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
}
.custom-input,
.custom-textarea,
.form-control,
.form-select {
    border-radius: 8px;
    border: 2px solid var(--secondary-color);
    padding: 12px;
}

/* Sidebar + Main Content Layout ------------------------------------------- */

/* Sidebar (desktop default) */
#sidebar-wrapper {
    position: fixed;
    top: 56px;
    left: 0;
    width: var(--sidebar-width);
    height: 100%;
    background: var(--neutral-color);
    z-index: 1000;
    transition: transform .3s ease;
}


/* Section headings */
#sidebar-wrapper .sidebar-heading {
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

/* Sidebar company heading */
#sidebar-wrapper .sidebar-heading.company-name {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 700;
    padding: 1rem 1rem 0.5rem 1rem;
}

#sidebar-wrapper .list-group-item.sub-item {
    padding-left: 1.5rem;     /* nice indent */
    font-size: 0.95rem;       /* slightly smaller */
}

/* Main content always leaves space for sidebar on desktop */
#main-content {
    margin-left: var(--sidebar-width);
    padding: 1rem;
    transition: margin-left .3s ease;
}

/* Offcanvas (mobile) behavior */
#sidebar-wrapper.show { transform: translateX(0); }
#main-content.shifted { margin-left: var(--sidebar-width); }

/* Sidebar toggler (hamburger) for small screens */
.sidebar-toggler {
    display: none;
    position: fixed;
    top: 56px; left: 10px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    padding: 1rem;
    z-index: 1100;
}

/* Responsive Breakpoints -------------------------------------------------- */

/* Desktop ≥ 992px: sidebar stays fixed, main content shifted by sidebar-width */
@media (min-width: 992px) {
    #main-content { margin-left: var(--sidebar-width); }
    /* Fix sidebar offcanvas so it always displays on desktop */
    #companySidebar.offcanvas {
        transform: none !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
    }

}

/* Tablet 768–991px: 
   Only hide sidebar if the page has the `.sidebar-toggler` element.
   Employer dashboard has no toggler → keep sidebar visible.
*/
@media (max-width: 991px) {

    /* Mobile/Tablet toggler appears when present */
    .sidebar-toggler { display: block; }

    /* Default: sidebar stays visible */
    #sidebar-wrapper {
        transform: translateX(0);
    }

    /* If toggler exists → page may hide sidebar */
    .has-sidebar-toggle #sidebar-wrapper {
        transform: translateX(-100%);
    }

    .has-sidebar-toggle #sidebar-wrapper.show {
        transform: translateX(0);
    }

    #main-content {
        margin-left: 10px !important;
    }
}


/* Mobile ≤ 768px: form/table sizing reduced */
@media (max-width: 768px) {
    .btn { font-size: .85rem; padding: .4rem .8rem; }
    table { font-size: 1rem; }
    form { padding: 15px; }
}

/* Mobile ≤ 576px: small refinements */
@media (max-width: 576px) {
    .card { padding: .5rem; }
    .btn { font-size: .8rem; padding: .3rem .6rem; }
}

/* Dark Mode --------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    .alert { background: rgba(0,0,0,0.9); color: #fff; }
    .bg-light-subtle { background: #3a2f00 !important; }
}


/* END OF FILE ------------------------------------------------------------- */
