/*  Student performance css
---------------------------------------------------------------------- */

.student-performence-alert {
    border: 0;
    border-radius: 0;
    position: relative;
    padding: 20px 15px;
    line-height: 20px;
}

.student-performence-alert.alert-info i {
    color: #00bcd4ba;
}

.student-performence-alert.alert-info {
    font-weight: 400;
    background-color: #00bcd42b;
    color: #00bcd4;
    border-radius: 6px;
    box-shadow: none;
}

.performence-section-content {
    margin-top: 45px !important;
}

#student-performence-section {
    font-family: inherit;
    padding: 20px 0px;
}

#student-performence-section .search-bar {
    max-width: 50%;
    margin: 0 auto 10px;
    position: relative;
}

#student-performence-section .search-bar input {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

#student-performence-section .search-bar .clear-icon {
    font-size: 27px;
    line-height: 1;
    user-select: none;
}

#student-performence-section .search-bar .clear-icon:hover {
    color: #888;
}

#student-performence-section .search-bar .glyphicon-search {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

#student-performence-section .student-card {
    background: linear-gradient(135deg, #6a1b9a, #9c27b0);
    color: white;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

#student-performence-section .student-card img {
    width: 100px;
    /* height: 100px; */
    height: 125px;
    border-radius: 8px;
    object-fit: cover;
}

#student-performence-section .student-info h3 {
    margin: 0 0 5px 0;
    font-weight: 600;
}

#student-performence-section .student-info p {
    margin: 10px 0;
    font-size: 14px;
}

#student-performence-section .info-section {
    background: white;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 20px 20px 14px 20px;
    margin-bottom: 20px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 0px 0px,
        rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
}

#student-performence-section .info-section h4 {
    margin-top: 0;
    font-weight: 600;
    color: #333;
}

#student-performence-section .info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

#student-performence-section .info-item {
    flex: 1 1 45%;
    min-width: 200px;
}

#student-performence-section .info-item label {
    font-weight: 600;
    color: #555;
    display: block;
    margin-bottom: 5px;
}

#student-performence-section .info-item span {
    font-size: 14px;
    color: #333;
}

#student-performence-section .fee-overview {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

#student-performence-section .fee-card {
    flex: 1;
    min-width: 250px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

#student-performence-section .fee-paid {
    background-color: #e8f5e9;
    color: #2e7d32;
}

#student-performence-section .balance-due {
    background-color: #ffebee;
    color: #c62828;
}

#student-performence-section .concession {
    background-color: #e3f2fd;
    color: #1565c0;
}

#student-performence-section .fee-card .amount {
    font-size: 24px;
    margin: 10px 0;
}

#student-performence-section .fee-card .label {
    font-size: 14px;
    font-weight: normal;
    color: inherit;
}

#student-performence-section .fee-table thead th {
    background-color: #f3e5f5;
    font-weight: 600;
    color: #333;
}

#student-performence-section .fee-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

#student-performence-section .view-more {
    text-align: right;
    margin-top: 10px;
}

#student-performence-section .view-more a {
    color: #0000ff;
    font-weight: 600;
    text-decoration: none;
}

#student-performence-section .view-more a:hover {
    text-decoration: none;
}

/* Exam sections */
#student-performence-section .exam-summary {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

#student-performence-section .exam-card {
    flex: 1;
    min-width: 200px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

#student-performence-section .total-exams {
    background-color: #e3e3f5;
    color: #333;
}

#student-performence-section .avg-marks {
    background-color: #fce4ec;
    color: #ad1457;
}

#student-performence-section .highest-score {
    background-color: #fff3e0;
    color: #f57f17;
}

#student-performence-section .lowest-score {
    background-color: #ffcdd2;
    color: #c62828;
}

#student-performence-section .exam-card .stat {
    font-size: 24px;
    margin: 10px 0;
}

#student-performence-section .exam-card .label {
    font-size: 14px;
    font-weight: normal;
    color: inherit;
    background: none !important;
}

#student-performence-section .exam-table thead th {
    background-color: #f3e5f5;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

#student-performence-section .exam-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

#student-performence-section .rank-link {
    color: #0000ff;
    font-weight: 500;
    text-decoration: none;
}

#student-performence-section .rank-link:hover {
    text-decoration: none;
    cursor: auto;
}

/* Table responsive styling */
#student-performence-section .table-responsive {
    /* border: 1px solid #eee; */
    border-radius: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#student-performence-section .table-responsive > .table {
    margin-bottom: 0;
    border: none;
}

/* Ensure minimum width for table cells on mobile */
@media (max-width: 768px) {
    #student-performence-section .table td,
    #student-performence-section .table th {
        white-space: nowrap;
        min-width: 100px;
    }

    #student-performence-section .table td:first-child,
    #student-performence-section .table th:first-child {
        min-width: 50px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #student-performence-section .student-card {
        flex-direction: column;
        text-align: center;
    }
    #student-performence-section .info-row {
        flex-direction: column;
    }
    #student-performence-section .info-item {
        flex: 100%;
        margin-bottom: 15px;
    }
    #student-performence-section .fee-overview,
    #student-performence-section .exam-summary {
        flex-direction: column;
    }
}

#student-performance {
    padding: 20px 20px 0px 20px;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.14);
}

#student-performance .header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#student-performance .search-bar {
    width: 50%;
    border-radius: 20px;
    border: 2px solid #ddd;
    padding: 12px 15px;
    display: flex;
    align-items: center;
}

#student-performance .search-bar input {
    border: none;
    outline: none;
    flex-grow: 1;
    padding: 0 10px;
    font-size: 14px;
    background: none;
}

#student-performance .search-bar .glyphicon-search {
    color: #999;
}

#student-performance .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 5px;
}

#student-performance .user-info img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: cover;
}

#student-performance .user-info div {
    text-align: right;
}

#student-performance .user-info span {
    display: block;
    font-size: 14px;
    color: #555;
}

/* Custom Tabs */
#student-performance .custom-tabs {
    /* border-bottom: 1px solid #eee; */
    margin-bottom: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

#student-performance .custom-tabs::-webkit-scrollbar {
    height: 4px;
}

#student-performance .custom-tabs::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#student-performance .custom-tabs::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

#student-performance .custom-tabs ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    min-width: min-content;
}

#student-performance .custom-tabs ul li {
    margin: 0;
    flex-shrink: 0;
}

#student-performance .custom-tabs ul li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    border: none;
    background: transparent;
    transition: all 0.3s;
    white-space: nowrap;
}

#student-performance .custom-tabs ul li a:hover {
    color: #7b4dff;
}

#student-performance .custom-tabs ul li.active a {
    color: #7b4dff;
    border-bottom: 3px solid #7b4dff !important;
    /* margin-bottom: -2px; */
    margin-bottom: 2px;
}

/* Tab Content */
#student-performance .tab-content > div {
    display: none;
}

#student-performance .tab-content > div.active {
    display: block;
}

#student-performance .stat-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

#student-performance .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

#student-performance .stat-icon-blue {
    background: #d0eaff;
    color: #007bff;
}

#student-performance .stat-icon-green {
    background: #d0f0e0;
    color: #28a745;
}

#student-performance .stat-icon-purple {
    background: #e0d0ff;
    color: #6f42c1;
}

#student-performance .stat-icon-orange {
    background: #ffe0d0;
    color: #fd7e14;
}

#student-performance .stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

#student-performance .stat-label {
    font-size: 14px;
    color: #777;
}

#student-performance .chart-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

#student-performance .chart-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

#student-performance .chart-placeholder {
    height: 250px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 10px 0;
}

#student-performance .bar {
    width: 40px;
    background: linear-gradient(to top, #7b4dff, #5a2cd8);
    border-radius: 4px 4px 0 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    text-align: center;
    padding: 5px 0;
}

#student-performance .bar.pink {
    background: linear-gradient(to top, #e84ae5, #c72dc7);
}

#student-performance .bar.dark-blue {
    background: linear-gradient(to top, #0056b3, #003d7a);
}

#student-performance .bar-label {
    position: absolute;
    bottom: -25px;
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: #555;
}

#student-performance .legend {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    font-size: 12px;
    color: #555;
}

#student-performance .legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

#student-performance .legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

#student-performance .legend-color-purple {
    background: #7b4dff;
}

#student-performance .legend-color-pink {
    background: #e84ae5;
}

#student-performance .legend-color-dark-blue {
    background: #0056b3;
}

#student-performance .table-responsive {
    margin-top: 20px;
}

#student-performance .table th {
    background-color: #f0e6f7;
    font-weight: 600;
    color: #555;
}

#student-performance .table td {
    vertical-align: middle;
    font-size: 14px;
}

#student-performance .download-link {
    color: #7b4dff;
    text-decoration: none;
    font-weight: 600;
}

#student-performance .download-link:hover {
    text-decoration: underline;
}

#student-performance .search-box {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-left: 10px;
}

/* Dropdowns styling */
#student-performance .dropdown-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    min-width: 120px;
    font-size: 14px;
}

#student-performance .dropdown-select::after {
    content: "▼";
    font-size: 10px;
    margin-left: 5px;
    color: #777;
}

@media (max-width: 768px) {
    #student-performance .header-section {
        flex-direction: column;
        align-items: stretch;
    }

    #student-performance .search-bar {
        width: 100%;
    }

    #student-performence-section .search-bar {
        max-width: 100%;
    }

    #student-performance .user-info {
        margin-top: 10px;
        justify-content: space-between;
    }

    #student-performance .stat-card {
        flex-direction: column;
        text-align: center;
    }

    #student-performance .stat-icon {
        margin: 0 auto 10px;
    }

    #student-performance .row > .col-md-6:first-child {
        margin-bottom: 15px;
    }

    #student-performance .row > .col-md-6.text-right {
        text-align: left !important;
    }

    #student-performance .dropdown-select {
        display: block;
        width: 100%;
        margin: 5px 0 !important;
    }

    #student-performance .custom-tabs {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    #student-performance .custom-tabs ul li a {
        padding: 10px 12px;
        font-size: 13px;
    }
}

#allExamsModal .table-bordered {
    border: 1px solid #ddd;
    border-radius: 6px !important;
}

#allCompExamsTable .table-bordered {
    border: 1px solid #ddd;
    border-radius: 6px !important;
}

#allExamsModalHeader,
#allCompExamsModalHeader {
    padding: 5px 0px 0px 0px;
}

#allExamsModalLabel,
#allCompExamsModalLabel {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

#allExamsTable > thead > tr > th,
#allCompExamsTable > thead > tr > th {
    font-size: 12px !important;
    padding: 12px !important;
    outline: 0;
}

#allExamsTable td,
#allExamsTable th,
#allCompExamsTable td,
#allCompExamsTable th {
    vertical-align: middle !important;
    font-size: 13px !important;
}

.performance-table.dataTable {
    clear: both;
    margin-top: 6px !important;
    margin-bottom: 6px !important;
    max-width: none !important;
    border-collapse: separate !important;
    border-radius: 6px !important;
}

/* Custom student search css
---------------------------------------------------------------------- */

.student-dropdown {
    display: none;
    position: absolute;
    z-index: 1000;
    background: white;
    border: 0px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 2px;
}

.student-dropdown.show {
    display: block;
}

.student-option {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #ebebeb;
    transition: background-color 0.2s ease;
}

.student-option:last-child {
    border-bottom: none;
}

.student-option:hover {
    background-color: #f5f5f5 !important;
}

.student-option.selected {
    background-color: #e3f2fd;
}

.student-option .student-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 2px;
}

.student-option .student-class {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.student-option .student-details {
    font-size: 11px;
    color: #999;
}

.student-option .student-uid {
    display: inline-block;
    margin-right: 10px;
}

.student-option .student-mobile {
    display: inline-block;
}

.student-option .student-parent {
    font-size: 11px;
    color: #777;
    font-style: normal;
}

.student-dropdown .loading-message {
    padding: 10px;
    text-align: center;
    color: #666;
    font-style: normal;
}

.student-dropdown .no-results {
    padding: 10px;
    color: #999;
    text-align: center;
    font-style: normal;
}

.student-dropdown .error-message {
    padding: 10px;
    color: #dc3545;
    text-align: center;
    background-color: #f8d7da;
    border-left: 3px solid #dc3545;
}

/* Scrollbar styling for the dropdown */
.student-dropdown::-webkit-scrollbar {
    width: 6px;
}

.student-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.student-dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.student-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Input field styling for student search */
.student_search_input {
    position: relative;
}

.student_search_input:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Modal specific adjustments */
.modal .student-dropdown {
    z-index: 1060; /* Higher than modal backdrop */
}

/* Responsive design */
@media (max-width: 768px) {
    .student-dropdown {
        max-height: 150px;
    }

    .student-option {
        padding: 10px 8px;
    }

    .student-option .student-name {
        font-size: 14px;
    }

    .student-option .student-class {
        font-size: 11px;
    }

    .student-option .student-details {
        font-size: 10px;
    }
}

/* Loading animation */
.student-dropdown .loading-message::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 5px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #666;
    border-radius: 50%;
    animation: spin-student 1s linear infinite;
}

@keyframes spin-student {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
