/**
 * BioMarkaz App Core - Main Stylesheet
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ====================================================
   GENERATEPRESS CONTAINER OVERRIDES
   Force the dashboard to use 100% viewport width,
   breaking free from GP's max-width grid system.
==================================================== */

.site.grid-container,
.site-content,
#content {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.container {
    max-width: 100% !important;
    padding: 0 !important;
}

/* GP wraps content in #page — remove its constraints too */
#page,
.wp-site-blocks,
.entry-content,
.hentry {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove default GP content padding */
.inside-article,
.page-content,
.entry-summary {
    padding: 0 !important;
}


:root {
    /* Brand Colors */
    --bm-color-primary:      #0B6E4F;
    --bm-color-primary-dark: #095940;
    --bm-color-accent:       #F4A830;
    --bm-color-accent-dark:  #e09622;
    --bm-color-light:        #F7F9FC;
    --bm-color-dark:         #0F1923;

    /* Text */
    --bm-color-text-main:    #333333;
    --bm-color-text-muted:   #666666;
    --bm-color-text-subtle:  #999999;
    --bm-color-text-light:   #FFFFFF;

    /* Borders */
    --bm-color-border:       #E2E8F0;
    --bm-color-border-hover: #CBD5E1;

    /* Shadows */
    --bm-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --bm-shadow:    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --bm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Typography */
    --bm-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Dimensions */
    --bm-header-height: 64px;
    --bm-sidebar-width: 240px;
}

/* ====================================================
   RESET & GLOBAL
==================================================== */

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

/* Hide WooCommerce / GeneratePress chrome */
.site-header,
.site-footer,
.woocommerce-breadcrumb,
.woocommerce-notices-wrapper {
    display: none !important;
}

body {
    background-color: var(--bm-color-light);
    font-family: var(--bm-font);
    margin: 0;
    padding: 0;
    padding-top: var(--bm-header-height); /* push content below fixed header */
}

/* ====================================================
   FIXED HEADER
==================================================== */

.bm-app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--bm-header-height);
    background: var(--bm-color-dark);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.bm-logo {
    color: var(--bm-color-accent);
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.bm-header-right {
    display: flex;
    align-items: center;
}

.bm-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.bm-nav-links a {
    color: white;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.bm-nav-links a:hover {
    color: var(--bm-color-accent);
}

.bm-header-btn {
    background: var(--bm-color-primary) !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
}

.bm-header-btn:hover {
    background: var(--bm-color-primary-dark) !important;
    color: white !important;
}

/* Mobile Hamburger */
.bm-mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.bm-mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s;
}

/* ====================================================
   DASHBOARD LAYOUT
==================================================== */

.bm-app-layout {
    display: block; /* sidebar is fixed, not in flow */
    min-height: calc(100vh - var(--bm-header-height));
}

/* Fixed Sidebar — flush under fixed header, no gap */
.bm-sidebar {
    position: fixed;
    top: var(--bm-header-height); /* exactly where header ends */
    left: 0;
    width: var(--bm-sidebar-width);
    height: calc(100vh - var(--bm-header-height));
    background: var(--bm-color-dark); /* same color as header = seamless */
    overflow-y: auto;
    z-index: 900;
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

/* Sidebar scrollbar (optional styling) */
.bm-sidebar::-webkit-scrollbar { width: 4px; }
.bm-sidebar::-webkit-scrollbar-track { background: transparent; }
.bm-sidebar::-webkit-scrollbar-thumb { background: #2d3748; border-radius: 4px; }

/* Sidebar Links */
.bm-sidebar-link {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 2px;
}

.bm-sidebar-link:hover {
    background: rgba(255,255,255,0.07);
    color: white;
}

.bm-sidebar-link--active {
    background: rgba(11, 110, 79, 0.25);
    color: white;
}

.bm-sidebar-link--danger {
    color: #fc8181 !important;
}

.bm-sidebar-link--danger:hover {
    background: rgba(229,62,62,0.15) !important;
    color: #fc8181 !important;
}

/* Sidebar Footer (pills etc) */
.bm-sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
}

.bm-pill-green {
    background: var(--bm-color-primary);
    color: white;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
}

.bm-pill-verified {
    background: #e6fffa;
    color: var(--bm-color-primary);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Main Content — offset by sidebar width */
.bm-main-content {
    margin-left: var(--bm-sidebar-width);
    width: calc(100% - var(--bm-sidebar-width));
    min-height: calc(100vh - var(--bm-header-height));
    padding: 32px;
    box-sizing: border-box;
}

/* ====================================================
   CARDS
==================================================== */

.bm-stat-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--bm-color-border);
    padding: 24px;
    box-shadow: var(--bm-shadow-sm);
    transition: box-shadow 0.2s;
}

.bm-stat-card:hover {
    box-shadow: var(--bm-shadow);
}

/* ====================================================
   BUTTONS
==================================================== */

.bm-btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-size: 0.95rem;
    text-decoration: none;
    font-family: var(--bm-font);
}

.bm-btn-primary {
    background-color: var(--bm-color-primary);
    color: white;
}

.bm-btn-primary:hover {
    background-color: var(--bm-color-primary-dark);
    color: white;
}

.bm-btn-accent {
    background-color: var(--bm-color-accent);
    color: var(--bm-color-dark);
}

.bm-btn-accent:hover {
    background-color: var(--bm-color-accent-dark);
}

/* ====================================================
   FORMS
==================================================== */

.bm-form {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--bm-shadow);
    max-width: 600px;
}

.bm-form-group {
    margin-bottom: 1.5rem;
}

.bm-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--bm-color-text-main);
    font-weight: 600;
    font-size: 0.9rem;
}

.bm-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--bm-color-border);
    border-radius: 8px;
    color: var(--bm-color-text-main);
    background-color: #fff;
    font-size: 0.95rem;
    font-family: var(--bm-font);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.bm-input:focus {
    outline: none;
    border-color: var(--bm-color-primary);
    box-shadow: 0 0 0 3px rgba(11, 110, 79, 0.12);
}

/* ====================================================
   JOB BOARD
==================================================== */

.bm-job-board-grid,
.bm-clinic-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.bm-job-card,
.bm-dashboard-card {
    background-color: #fff;
    border: 1px solid var(--bm-color-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--bm-shadow-sm);
    display: flex;
    flex-direction: column;
}

.bm-job-title    { margin-top: 0; color: var(--bm-color-primary); font-size: 1.1rem; }
.bm-job-details  { padding-bottom: 1rem; border-bottom: 1px solid var(--bm-color-border); margin-bottom: 1rem; }
.bm-job-meta     { color: var(--bm-color-text-muted); font-size: 0.9rem; margin: 0.25rem 0; }
.bm-job-content  { flex-grow: 1; color: var(--bm-color-text-main); margin-bottom: 1.5rem; line-height: 1.6; }

.bm-job-bids-section  { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--bm-color-border); }
.bm-job-bids-section h4 { margin-top: 0; color: var(--bm-color-primary); }

.bm-bid-list    { display: flex; flex-direction: column; gap: 1rem; }
.bm-bid-item    { background: #f8fafc; border: 1px solid var(--bm-color-border); border-radius: 8px; padding: 1rem; }
.bm-bid-meta    { margin-top: 0; color: var(--bm-color-text-main); font-weight: bold; }
.bm-bid-message { color: var(--bm-color-text-muted); font-size: 0.9rem; margin-bottom: 1rem; }

.bm-accept-bid-btn { width: 100%; }

.bm-success-message { padding: 1rem; background: #e6fffa; color: #234e52; border-left: 4px solid #319795; border-radius: 4px; }
.bm-alert-info      { padding: 1rem; background: #ebf8ff; color: #2b6cb0; border-radius: 8px; text-align: center; }

/* ====================================================
   MOBILE RESPONSIVE
==================================================== */

@media (max-width: 768px) {
    /* Header nav collapses */
    .bm-nav-links {
        display: none;
        position: absolute;
        top: var(--bm-header-height);
        left: 0;
        width: 100%;
        background: var(--bm-color-dark);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: var(--bm-shadow-lg);
        z-index: 999;
    }

    .bm-nav-links.active {
        display: flex;
    }

    .bm-nav-links a {
        padding: 0.75rem 24px;
        width: 100%;
    }

    .bm-mobile-toggle {
        display: flex;
    }

    /* Sidebar slides off-screen, toggled with .open class via JS */
    .bm-sidebar {
        transform: translateX(-100%);
    }

    .bm-sidebar.open {
        transform: translateX(0);
    }

    /* Main content takes full width on mobile */
    .bm-main-content {
        margin-left: 0;
        width: 100%;
    }
}
