/*
 * Project-wide Laravel 11 UI alignment pass.
 * Keep this file as the final shared override for front, student, and backend layouts.
 */

:root {
    --zu-green: var(--primary-color);
    --zu-green-dark: var(--primary-color-dark);
    --zu-green-soft: var(--primary-color-soft);
    --zu-gray: #58595b;
    --zu-border: #dfe6e2;
    --zu-panel: #ffffff;
    --zu-bg: #f6f8f7;
    --zu-shadow: 0 8px 22px rgba(0, 0, 0, .055);
}

html {
    min-width: 320px;
}

body {
    color: #333;
    background-color: var(--zu-bg);
    font-family: "Open Sans", Arial, sans-serif;
    line-height: 1.45;
}

img {
    max-width: 100%;
}

a {
    color: var(--zu-green);
}

a:hover,
a:focus {
    color: var(--zu-green-dark);
    text-decoration: none;
}

.container {
    width: min(1170px, calc(100% - 24px));
}

.row {
    min-width: 0;
}

[class*="col-"] {
    min-width: 0;
}

#wrapper {
    overflow-x: hidden;
}

.header,
.login-box,
.prog_inner_wrapper,
.application-form-panel,
.student-summary-card,
.student-profile-card,
.panel,
.box,
.grid,
.card-like {
    border-radius: 4px;
}

.panel,
.box,
.grid {
    border-color: var(--zu-border);
}

.panel-heading,
.panel-title {
    line-height: 1.35;
}

.panel-heading {
    padding: 11px 14px;
}

.panel-body {
    padding: 15px;
}

.alert {
    border-radius: 4px;
    line-height: 1.45;
}

.alert h1,
.alert h2,
.alert h3,
.alert h4,
.alert h5 {
    line-height: 1.35;
}

.form-group {
    margin-bottom: 14px;
}

label {
    line-height: 1.35;
}

.form-control,
select,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"] {
    max-width: 100%;
    min-height: 34px;
    border-color: #cfd8d3;
    border-radius: 3px;
    box-shadow: none;
}

textarea.form-control {
    min-height: 86px;
}

.form-control:focus {
    border-color: var(--zu-green);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), .12);
}

.input-group {
    max-width: 100%;
}

.btn {
    border-radius: 3px;
    line-height: 1.3;
    white-space: normal;
}

.btn-sm,
.btn-xs {
    line-height: 1.25;
}

.btn-primary,
.btn-footer,
.btn-dirtygreen,
.btn-success {
    color: #fff;
    background-color: var(--zu-green);
    border-color: var(--zu-green);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-footer:hover,
.btn-footer:focus,
.btn-dirtygreen:hover,
.btn-dirtygreen:focus,
.btn-success:hover,
.btn-success:focus {
    color: #fff;
    background-color: var(--zu-green-dark);
    border-color: var(--zu-green-dark);
}

.btn-featured {
    width: 100%;
    max-width: 100%;
    min-height: 48px;
}

.btn-featured span {
    width: 100%;
    line-height: 1.25 !important;
    white-space: normal;
}

.btn-featured i {
    min-width: 48px;
}

.table-responsive {
    width: 100%;
    border: 0;
}

.table {
    width: 100%;
    margin-bottom: 16px;
    background: #fff;
}

.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th {
    color: var(--zu-gray);
    background: var(--zu-green-soft);
    vertical-align: middle;
}

.table > thead > tr > th,
.table > tbody > tr > th,
.table > tbody > tr > td {
    padding: 8px 10px;
    vertical-align: middle;
    line-height: 1.35;
}

.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tbody > tr > td {
    border-color: var(--zu-border);
}

.label {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 3px;
    line-height: 1.2;
    white-space: normal;
}

.modal-dialog {
    width: min(96%, 900px);
}

.modal-content {
    border: 0;
    border-radius: 5px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .22);
}

.modal-header {
    color: #fff;
    background: var(--zu-green);
    border-radius: 5px 5px 0 0;
}

.modal-header .close {
    color: #fff;
    opacity: .9;
}

.modal-title {
    line-height: 1.35;
}

.dropdown-menu {
    border-color: var(--zu-border);
    border-radius: 4px;
    box-shadow: var(--zu-shadow);
}

.dropdown-menu > li > a {
    padding: 8px 14px;
    line-height: 1.35;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
    color: #fff;
    background: var(--zu-green);
}

.select2-positioning-parent {
    position: relative !important;
}

.select2-container {
    max-width: 100%;
}

.select2-container,
.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    min-height: 34px;
    border-color: #cfd8d3;
    border-radius: 3px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 10px;
    padding-right: 28px;
    line-height: 32px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 32px;
}

.select2-container--default .select2-selection--multiple {
    min-height: 34px;
    border-color: #cfd8d3;
    border-radius: 3px;
}

.select2-container--open {
    z-index: 10610;
}

.zu-select2-dropdown-container {
    position: absolute !important;
    z-index: 10620 !important;
}

.zu-select2-dropdown-container .select2-dropdown {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
}

.admission-filter-field > .zu-select2-dropdown-container,
.candidate-filter-field > .zu-select2-dropdown-container,
.admin-candidates-field > .zu-select2-dropdown-container,
.forms-summary-field > .zu-select2-dropdown-container,
.admission-round-field > .zu-select2-dropdown-container,
.program-rights-field > .zu-select2-dropdown-container,
.add-tax-field > .zu-select2-dropdown-container,
.admin-calendar-field > .zu-select2-dropdown-container,
.email-import-field > .zu-select2-dropdown-container,
.cms-demographics-field > .zu-select2-dropdown-container,
.select2-field > .zu-select2-dropdown-container,
.form-group > .zu-select2-dropdown-container,
td > .zu-select2-dropdown-container,
th > .zu-select2-dropdown-container {
    left: 0 !important;
    right: auto !important;
    top: 100% !important;
    width: 100% !important;
    min-width: 100% !important;
}

.admission-filter-field > .zu-select2-dropdown-container,
.candidate-filter-field > .zu-select2-dropdown-container,
.admin-candidates-field > .zu-select2-dropdown-container,
.forms-summary-field > .zu-select2-dropdown-container,
.admission-round-field > .zu-select2-dropdown-container,
.program-rights-field > .zu-select2-dropdown-container,
.add-tax-field > .zu-select2-dropdown-container,
.admin-calendar-field > .zu-select2-dropdown-container,
.email-import-field > .zu-select2-dropdown-container,
.cms-demographics-field > .zu-select2-dropdown-container,
.select2-field > .zu-select2-dropdown-container,
.form-group > .zu-select2-dropdown-container,
td > .zu-select2-dropdown-container,
th > .zu-select2-dropdown-container {
    left: 0 !important;
    right: auto !important;
    top: 100% !important;
    width: 100% !important;
    min-width: 100% !important;
}

.select2-container--open .select2-dropdown {
    margin-top: 0;
    border-color: #cfd8d3;
    border-radius: 0 0 3px 3px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .14);
    z-index: 10610;
}

.modal .select2-container--open,
.modal .select2-container--open .select2-dropdown {
    z-index: 10620;
}

.select2-results__options {
    max-height: 240px;
}

.select2-search--dropdown {
    padding: 6px;
}

.select2-search--dropdown .select2-search__field {
    min-height: 32px;
    border-color: #cfd8d3;
    border-radius: 3px;
}

.dropdown,
.btn-group,
.input-group-btn {
    position: relative;
}

.dropdown-menu {
    top: 100%;
    left: 0;
    right: auto;
    z-index: 10600;
}

.modal .form-group,
.modal .input-group,
.modal .admission-filter-field,
.modal .select2-field,
.panel-body .form-group,
.panel-body .input-group,
.admission-filter-field,
.candidate-filter-field,
.admin-candidates-field,
.forms-summary-field,
.admission-round-field,
.program-rights-field,
.add-tax-field,
.admin-calendar-field,
.email-import-field,
.cms-demographics-field,
.table-responsive .form-group,
.dataTables_wrapper .form-group,
td .form-group,
td .input-group {
    overflow: visible;
}

.dataTables_wrapper {
    width: 100%;
    overflow-x: auto;
}

.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length {
    margin-bottom: 10px;
}

.dataTables_wrapper .dataTables_filter input {
    min-width: 260px;
    margin-left: 8px;
    border: 1px solid #cfd8d3;
    border-radius: 3px;
    padding: 6px 8px;
}

.bg-white {
    background-color: #fff !important;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.pull-right,
.pull-left {
    max-width: 100%;
}

#topNav .top_logo,
.top_logo {
    display: inline-block;
    width: auto;
    max-width: 100%;
    height: auto;
}

/* Backend shell */
body > #wrapper.clearfix,
#middle,
#content.dashboard {
    min-width: 0;
}

#content.dashboard {
    padding: 20px;
}

#middle #content > .row,
#middle #content > form > .row {
    margin-left: -10px;
    margin-right: -10px;
}

#aside #sideNav ul.nav-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    line-height: 1.25;
}

#aside #sideNav ul.nav-list li a span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

#aside #sideNav .main-icon {
    flex: 0 0 20px;
    text-align: center;
}

#header .logo img {
    max-height: 45px;
    object-fit: contain;
}

#header .user-avatar {
    object-fit: cover;
    border-radius: 50%;
}

.select2-container--default .select2-selection--single {
    position: relative;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-right: 56px;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute;
    top: 1px;
    right: 30px;
    z-index: 2;
    display: inline-flex;
    width: 22px;
    height: calc(100% - 2px);
    min-height: 30px;
    margin: 0;
    align-items: center;
    justify-content: center;
    color: #8d9b94;
    border-radius: 3px;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    text-align: center;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
    color: #d9231f;
    background: rgba(217, 35, 31, .08);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    right: 6px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    display: inline-flex;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    font-size: 15px;
    line-height: 1;
    vertical-align: middle;
}

/* Student shell */
.student-backbar {
    min-height: 34px;
}

.student-summary-card .table-responsive,
.student-profile-card {
    margin-bottom: 12px;
}

.avatar-upload .avatar-preview {
    margin: 0 auto;
}

#admitnewbar .col-md-9,
#admitnewbar .col-md-3,
#adminnewbar .col-md-9,
#adminnewbar .col-md-3 {
    min-height: 0;
}

/* Front program/list pages */
.program-list-page,
#program_wrapper {
    max-width: 100%;
}

.program-list-page .accordion,
#program_wrapper .accordion {
    overflow-wrap: anywhere;
}

@media (min-width: 992px) {
    .form-horizontal .control-label {
        padding-top: 8px;
        text-align: right;
    }
}

@media (max-width: 991px) {
    .container {
        width: calc(100% - 20px);
    }

    #content.dashboard {
        padding: 14px;
    }

    .table-responsive {
        overflow-x: auto;
    }

    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length {
        float: none;
        text-align: left;
    }
}

@media (max-width: 767px) {
    body {
        font-size: 13px;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 20px;
    }

    h4 {
        font-size: 17px;
    }

    .container {
        width: calc(100% - 16px);
    }

    .row {
        margin-left: -8px;
        margin-right: -8px;
    }

    [class*="col-"] {
        padding-left: 8px;
        padding-right: 8px;
    }

    .panel-body,
    .application-form-panel,
    .student-summary-card {
        padding: 12px;
    }

    .table > thead > tr > th,
    .table > tbody > tr > th,
    .table > tbody > tr > td {
        padding: 7px 8px;
    }

    .btn,
    .form-control {
        font-size: 13px;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        min-width: 0;
        margin: 6px 0 0;
    }

    .pull-right,
    .pull-left {
        float: none !important;
    }
}


