/* =====================================================================
   Bedrijvenroute Zwijndrecht â€“ Leerling & Docent modules
   Prefix: bzl_

   NOTE: student-form inputs/buttons/loader/modal use bz_ classes
   from forms.css. Only route-card and dashboard styles live here.
   ===================================================================== */


/* â”€â”€ Student form: route field container â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* Remove the default overflow:hidden on the field el so cards breathe */
.bz_form .bz_form_field_el.bzl_route_field_el {
    overflow: visible;
}

/* Inline spinner for routes loading (not full overlay) */
.bzl_routes_loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    padding: 18px 0;
    font-family: var(--bodyfont, 'Inter', sans-serif);
}

/* Reuse the existing spinner shape but without the overlay context */
.bzl_spinner_inline {
    width: 22px;
    height: 22px;
    border-width: 3px;
    flex-shrink: 0;
}

.bzl_routes_empty {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    padding: 16px 20px;
    margin: 0;
    border-radius: 6px;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    font-family: var(--bodyfont, 'Inter', sans-serif);
    line-height: 1.5;
}

/* â”€â”€ Route cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.bzl_routes_grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 3px;
}

.bzl_route_card {
    background: #fff;
    border-radius: 8px;
    padding: 16px 18px;
    cursor: pointer;
    transition: box-shadow 0.2s ease, outline 0.15s ease;
    position: relative;
    user-select: none;
    outline: 3px solid transparent;
    outline-offset: 0px;
}
.bzl_route_card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.bzl_route_card.bzl_route_selected {
    outline-color: var(--secondary, #333);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.bzl_route_card:focus-visible {
    outline-color: var(--secondary, #333);
}
.bzl_route_card.bzl_route_full {
    cursor: not-allowed;
    opacity: 0.8;
}
.bzl_route_card.bzl_route_full:hover {
    box-shadow: none;
}

.bzl_route_card_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.bzl_route_naam {
    font-weight: 700;
    font-size: 16px;
    color: #1a1a1a;
    font-family: var(--bodyfont, 'Inter', sans-serif);
}

.bzl_route_badge {
    font-size: 12px;
    font-weight: 700;
    color: #2e7d32;
    background: rgba(46, 125, 50, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
.bzl_route_badge_vol {
    color: #b71c1c;
    background: rgba(183, 28, 28, 0.1);
}

/* Company list inside card */
.bzl_route_bedrijven {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bzl_route_bedrijf {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    border-top: 1px solid #f0f0f0;
}
.bzl_route_bedrijf:first-child { border-top: none; }

.bzl_bedrijf_logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
    background: #f8f8f8;
    padding: 2px;
}

.bzl_bedrijf_info {
    flex: 1;
    min-width: 0;
    font-family: var(--bodyfont, 'Inter', sans-serif);
    line-height: 1.5;
}

.bzl_bedrijf_naam {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}

.bzl_bedrijf_omschrijving {
    font-size: 13px;
    color: #666;
}

.bzl_bedrijf_tijd {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 1px;
}

/* Selected checkmark */
.bzl_route_check {
    position: absolute;
    top: 13px;
    right: 14px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--secondary, #333);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    pointer-events: none;
}

/* Form-level API error (different from inline field error) */
.bzl_apierror_field { margin-top: -8px; }
.bzl_api_error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #d32f2f;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    font-family: var(--bodyfont, 'Inter', sans-serif);
}


/* â”€â”€ Dashboard shared utilities (outside .bz_form context) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.bzl_input {
    padding: 14px 18px;
    font-family: var(--bodyfont, 'Inter', sans-serif);
    font-size: 15px;
    color: #1a1a1a;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.bzl_input:focus {
    outline: none;
    border-color: var(--primary, #333);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}
.bzl_has_error .bzl_input { border-color: #d32f2f; }
select.bzl_input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}

.bzl_field_error {
    font-size: 13px;
    color: #d32f2f;
    font-weight: 600;
    margin-bottom: 4px;
}

.bzl_btn_primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 30px;
    background: var(--secondary, #333);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--bodyfont, 'Inter', sans-serif);
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}
.bzl_btn_primary:hover   { opacity: 0.88; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }
.bzl_btn_primary:active  { opacity: 1;    transform: translateY(0); }
.bzl_btn_primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.bzl_btn_secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 26px;
    background: transparent;
    color: var(--secondary, #333);
    border: 2px solid var(--secondary, #333);
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--bodyfont, 'Inter', sans-serif);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.bzl_btn_secondary:hover { background: var(--secondary, #333); color: #fff; }

/* Standalone spinner for dashboard (not inside .bz_form loader) */
.bzl_spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 4px solid #e0e0e0;
    border-top-color: var(--primary, #333);
    border-radius: 50%;
    animation: bzl_spin 0.75s linear infinite;
    flex-shrink: 0;
}
.bzl_spinner_sm { width: 20px; height: 20px; border-width: 3px; }
@keyframes bzl_spin { to { transform: rotate(360deg); } }

.bzl_loader_state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 20px;
    color: #888;
    font-size: 15px;
    font-family: var(--bodyfont, 'Inter', sans-serif);
}

.bzl_modal_api_error {
    background: #fff0f0;
    color: #c62828;
    border-left: 4px solid #d32f2f;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}


/* â”€â”€ Docent dashboard â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.bzl_dashboard_wrap {
    font-family: var(--bodyfont, 'Inter', sans-serif);
    max-width: 1140px;
    margin: 0 auto;
}

.bzl_dashboard_header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.bzl_dashboard_title {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 4px;
    font-family: var(--headerfont, inherit);
}
.bzl_dashboard_school {
    font-size: 15px;
    color: #888;
    margin: 0;
}
.bzl_dashboard_actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* Stats */
.bzl_stats_row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.bzl_stat_card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 110px;
}
.bzl_stat_num {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    color: #1a1a1a;
}
.bzl_stat_label {
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

/* Toolbar */
.bzl_table_toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.bzl_search_input { flex: 1; min-width: 200px; }
.bzl_filter_select { width: auto; min-width: 190px; flex-shrink: 0; }

/* Table */
.bzl_table_section { margin-top: 4px; }
.bzl_table_responsive {
    overflow-x: auto;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
}
.bzl_table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}
.bzl_table thead th {
    background: #f8f8f8;
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e8e8e8;
    white-space: nowrap;
}
.bzl_table tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #1a1a1a;
    vertical-align: middle;
}
.bzl_table tbody tr:last-child td { border-bottom: none; }
.bzl_table tbody tr:hover { background: #fafafa; }
.bzl_table a { color: var(--secondary, #333); text-decoration: none; }
.bzl_table a:hover { text-decoration: underline; }

.bzl_row_actions {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}
.bzl_btn_icon {
    width: 32px;
    height: 32px;
    padding: 0;
    background: #f2f2f2;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    color: #555;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.bzl_btn_icon:hover { background: #e0e0e0; color: #111; }
.bzl_btn_danger:hover { background: #ffebee; color: #d32f2f; }

.bzl_empty_state {
    padding: 48px 24px;
    text-align: center;
    color: #aaa;
    font-size: 15px;
    background: #fff;
}

/* Modal */
.bzl_modal_overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    box-sizing: border-box;
}
.bzl_modal {
    background: #fff;
    border-radius: 14px;
    padding: 36px;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
}
.bzl_modal_title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 24px;
    color: #1a1a1a;
    font-family: var(--headerfont, inherit);
}
.bzl_modal_fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.bzl_modal_row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.bzl_modal_field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.bzl_modal_field label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    font-family: var(--bodyfont, 'Inter', sans-serif);
}
.bzl_modal_actions {
    display: flex;
    gap: 12px;
    padding-top: 6px;
    flex-wrap: wrap;
}

/* Login wrap */
.bzl_login_wrap {
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    border-radius: 14px;
    padding: 36px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    font-family: var(--bodyfont, 'Inter', sans-serif);
}
.bzl_login_title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 24px;
    color: #1a1a1a;
    font-family: var(--headerfont, inherit);
}

/* â”€â”€ Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 700px) {
    .bzl_dashboard_header  { flex-direction: column; }
    .bzl_dashboard_actions { width: 100%; flex-direction: column; }
    .bzl_btn_primary,
    .bzl_btn_secondary     { width: 100%; }
    .bzl_modal             { padding: 24px 20px; border-radius: 10px; }
    .bzl_modal_row         { grid-template-columns: 1fr; }
    .bzl_route_card_header { flex-direction: column; align-items: flex-start; gap: 6px; }
    .bzl_route_check       { top: 10px; }
    .bzl_stats_row         { gap: 8px; }
    .bzl_stat_card         { flex: 1; min-width: calc(50% - 4px); }

    /* Stack table on mobile */
    .bzl_table thead        { display: none; }
    .bzl_table tbody tr     { display: block; border-bottom: 2px solid #e8e8e8; padding: 10px 0; }
    .bzl_table tbody td     { display: flex; justify-content: space-between; padding: 5px 16px; border-bottom: none; }
    .bzl_table tbody td[data-label]::before { content: attr(data-label); font-weight: 700; color: #888; font-size: 12px; text-transform: uppercase; }
    .bzl_row_actions        { padding: 8px 16px; }
}
