/* Custom styles for RTU Student Portal */

/* General Styles */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    font-variant: small-caps;
}

/* Card Styles */
.card {
    border-radius: 15px;
    transition: transform 0.2s ease-in-out;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
}

/* Input Styles */
.input-group-text {
    border-radius: 8px 0 0 8px;
}

.form-control {
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* Button Styles */
.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-1px);
}

/* Table Styles */
.table {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    white-space: nowrap;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.table td {
    vertical-align: middle;
}

/* Summary Cards */
.bg-opacity-10 {
    border-radius: 10px;
    transition: transform 0.2s ease-in-out;
    height: 100%;
}

.bg-opacity-10:hover {
    transform: translateY(-3px);
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#studentInfo {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    .card {
        margin: 0 0 0.5rem 0;
        border-radius: 10px;
    }
    .input-group {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.3rem;
        display: flex;
    }
    .input-group-row-mobile {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: 100%;
    }
    .input-group-text {
        border-radius: 4px 0 0 4px !important;
        height: 2.2rem !important;
        font-size: 0.95rem !important;
        min-width: 2.2rem !important;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 0.5rem !important;
    }
    .form-control {
        border-radius: 0 4px 4px 0 !important;
        height: 2.2rem !important;
        font-size: 0.95rem !important;
        flex: 1 1 0%;
    }
    .input-group > .btn {
        width: 100%;
        margin-top: 0.3rem;
        align-self: stretch;
    }
    .input-group {
        width: 100%;
    }
    .input-group > .input-group-text,
    .input-group > .form-control {
        margin-bottom: 0 !important;
    }
    #semesterSelect,
    .form-select.form-select-lg {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.5rem !important;
        border-radius: 3px !important;
        height: 1.7rem !important;
        min-height: 1.7rem !important;
    }
    .form-label {
        font-size: 0.7rem !important;
        margin-bottom: 0.1rem !important;
    }
    h1, .display-4 {
        font-size: 1.5rem;
    }
    .lead, .form-label, .card-title, h4, h5, h2, h3 {
        font-size: 1rem;
    }
    .table td, .table th {
        padding: 0.4rem;
        font-size: 0.8rem;
    }
    #gwa {
        font-size: 1.1rem;
        margin-top: 0.2rem;
    }
    .row.text-center > div {
        margin-bottom: 0.5rem;
    }
    .table-responsive {
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
        width: calc(100% + 1rem);
    }
    #studentInfo .card-body,
    #studentInfo .card {
        padding: 0.5rem !important;
        border-radius: 7px;
    }
    #studentInfo .card-title {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    #studentInfo .row.g-3 {
        margin-left: 0;
        margin-right: 0;
        gap: 0.2rem;
    }
    #studentInfo p,
    #studentInfo .h5 {
        font-size: 0.85rem;
        margin-bottom: 0.1rem;
    }
    .summary-row {
        display: flex;
        flex-wrap: wrap;
        gap: 0.3rem;
        margin-bottom: 0.2rem;
    }
    .summary-row > .col-6 {
        flex: 0 0 48%;
        max-width: 48%;
        margin-bottom: 0.2rem;
    }
    .card-title, .summary-row p, .summary-row h3 {
        font-size: 0.85rem;
        margin-bottom: 0.1rem;
    }
    .summary-row .p-2 {
        padding: 0.3rem !important;
    }
    .bg-dark.bg-opacity-10 {
        padding: 0.3rem !important;
    }
}

@media (min-width: 769px) {
    .container {
        max-width: 1200px;
        padding: 2rem;
    }

    .card {
        margin-bottom: 2rem;
    }

    .table td, .table th {
        padding: 1rem;
    }

    /* Desktop Summary Cards */
    .row.text-center > div {
        padding: 0 0.5rem;
    }

    /* Desktop GWA Display */
    #gwa {
        font-size: 3.5rem;
    }

    .summary-row {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.5rem;
        margin-bottom: 0;
    }
    .summary-row > .col-6.col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
        margin-bottom: 0;
        padding-left: 0;
        padding-right: 0;
    }
    .summary-row > .col-6.col-md-3 > div {
        width: 100%;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

/* Print Styles */
@media print {
    body {
        background-color: white;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }

    .btn, .input-group {
        display: none;
    }

    .table {
        border: 1px solid #dee2e6;
    }

    .table td, .table th {
        border: 1px solid #dee2e6;
    }
}

.card-header {
    border-bottom: none;
}

#studentInfo .card-body {
    background-color: #f8f9fa;
}

#gradesTable .table {
    margin-bottom: 0;
}

#summaryCard .card {
    transition: transform 0.2s;
}

#summaryCard .card:hover {
    transform: translateY(-5px);
}

.d-none {
    display: none !important;
}

body, button, input, select, textarea, .form-label, .card-title, h1, h2, h3, h4, h5, h6, .btn, .input-group-text, .lead, .table, .table th, .table td {
    font-variant: small-caps;
}

.input-inner-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
}
.input-inner-group .input-group-text {
    border-radius: 4px 0 0 4px !important;
    height: 2.2rem !important;
    font-size: 0.95rem !important;
    min-width: 2.2rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem !important;
}
.input-inner-group .form-control {
    border-radius: 0 4px 4px 0 !important;
    height: 2.2rem !important;
    font-size: 0.95rem !important;
    flex: 1 1 0%;
}
@media (max-width: 768px) {
    .input-group {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.3rem;
        display: flex;
    }
    .input-inner-group {
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
    }
    .input-group > .btn {
        width: 100%;
        margin-top: 0.3rem;
        align-self: stretch;
    }
}
@media (min-width: 769px) {
    .input-group {
        flex-direction: row !important;
        align-items: center !important;
        gap: 0;
        display: flex;
    }
    .input-inner-group {
        display: inline-flex;
        flex-direction: row;
        align-items: center;
        width: auto;
    }
    .input-group > .btn {
        width: auto !important;
        margin-top: 0 !important;
        align-self: center !important;
        padding: 0.5rem 1rem !important;
        font-size: 1rem !important;
        border-radius: 0.375rem !important;
    }
} 