/* Vista College Colors */
:root {
    --vista-white: #FEFEFE;
    --vista-grey: #CCCECF;
    --vista-coral: #D3705A;
    --vista-peach: #CD977E;
    --vista-blue: #1F4952;
}

/* Custom styles */
.navbar {
    margin-bottom: 2rem;
    background-color: var(--vista-blue) !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--vista-white);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--vista-grey);
}

.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 100%;
    background-color: var(--vista-white);
    border: none;
}


.table {
    background-color: var(--vista-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Grid view styles */
.item-card {
    transition: transform 0.2s;
}

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

.item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-top-left-radius: calc(0.375rem - 1px);
    border-top-right-radius: calc(0.375rem - 1px);
}

.item-card .card-body {
    display: flex;
    flex-direction: column;
}

.item-card .card-footer {
    background-color: transparent;
    border-top: none;
    padding-top: 0;
}

/* Image preview */
#imagePreview img {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    border-radius: 4px;
}

/* List view image thumbnail */
.item-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.btn {
    margin: 2px;
}

.btn-primary {
    background-color: var(--vista-coral);
    border-color: var(--vista-coral);
}

.btn-primary:hover {
    background-color: var(--vista-peach);
    border-color: var(--vista-peach);
}

.btn-outline-primary {
    color: var(--vista-coral);
    border-color: var(--vista-coral);
}

.btn-outline-primary:hover {
    background-color: var(--vista-coral);
    border-color: var(--vista-coral);
}

.btn-outline-primary.active {
    background-color: var(--vista-coral) !important;
    border-color: var(--vista-coral) !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--vista-coral);
    box-shadow: 0 0 0 0.25rem rgba(211, 112, 90, 0.25);
}

body {
    background-color: var(--vista-grey);
}

.navbar-brand {
    font-weight: bold;
    color: var(--vista-white) !important;
}

.card-header {
    background-color: var(--vista-blue);
    border-bottom: none;
    color: var(--vista-white);
}

.table-responsive {
    border-radius: 0.25rem;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(204, 206, 207, 0.1);
}

.badge.bg-success {
    background-color: var(--vista-coral) !important;
}

.badge.bg-secondary {
    background-color: var(--vista-grey) !important;
}

/* Modal styling */
.modal-header {
    background-color: var(--vista-blue);
    color: var(--vista-white);
}

.modal-header .btn-close {
    color: var(--vista-white);
    opacity: 1;
}

/* Modal image styling */
.modal-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    margin-bottom: 1rem;
    background-color: var(--vista-grey);
    border-radius: 4px;
    overflow: hidden;
}

.modal-item-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Status badges */
.badge {
    padding: 0.5em 1em;
}

.reservation-pending {
    background-color: #ffc107;
    color: #000;
}

.reservation-approved {
    background-color: var(--vista-coral);
    color: var(--vista-white);
}

.reservation-rejected {
    background-color: var(--vista-grey);
    color: var(--vista-blue);
}

/* Table styling */
.table-dark {
    background-color: var(--vista-blue) !important;
    color: var(--vista-white) !important;
}

.table-dark th {
    border-color: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    padding: 12px 8px;
    font-size: 0.9rem;
    background-color: var(--vista-blue) !important;
    color: var(--vista-white) !important;
}

.table tbody tr:hover {
    background-color: rgba(211, 112, 90, 0.1) !important;
}

.table td {
    vertical-align: middle;
    padding: 12px 8px;
    font-size: 0.9rem;
    border-color: var(--vista-grey) !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(204, 206, 207, 0.05) !important;
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: var(--vista-white) !important;
}

/* Specific column widths for reservations table */
.reservations-table th:nth-child(1), /* Student */
.reservations-table td:nth-child(1) {
    width: 12%;
    min-width: 90px;
}

.reservations-table th:nth-child(2), /* Item Name */
.reservations-table td:nth-child(2) {
    width: 22%;
    min-width: 130px;
}

.reservations-table th:nth-child(3), /* Quantity */
.reservations-table td:nth-child(3) {
    width: 8%;
    min-width: 60px;
    text-align: center;
}

.reservations-table th:nth-child(4), /* Location */
.reservations-table td:nth-child(4) {
    width: 12%;
    min-width: 90px;
    text-align: center;
}

.reservations-table th:nth-child(5), /* Reserved Date */
.reservations-table td:nth-child(5) {
    width: 13%;
    min-width: 100px;
    text-align: center;
}

.reservations-table th:nth-child(6), /* Status */
.reservations-table td:nth-child(6) {
    width: 10%;
    min-width: 80px;
    text-align: center;
}

.reservations-table th:nth-child(7), /* Actions */
.reservations-table td:nth-child(7) {
    width: 23%;
    min-width: 140px;
    text-align: center;
}

/* Badge styling for better visibility */
.badge {
    font-size: 0.75rem;
    padding: 0.4em 0.8em;
    font-weight: 600;
}

/* Vista-colored status badges */
.reservation-pending {
    background-color: #ffc107 !important;
    color: var(--vista-blue) !important;
    border: 1px solid var(--vista-peach);
}

.reservation-approved {
    background-color: var(--vista-coral) !important;
    color: var(--vista-white) !important;
    border: 1px solid var(--vista-coral);
}

.reservation-rejected {
    background-color: var(--vista-grey) !important;
    color: var(--vista-blue) !important;
    border: 1px solid var(--vista-grey);
}

.reservation-return_pending {
    background-color: #ffc107 !important;
    color: var(--vista-blue) !important;
    border: 1px solid var(--vista-peach);
}

.reservation-returned {
    background-color: var(--vista-peach) !important;
    color: var(--vista-white) !important;
    border: 1px solid var(--vista-peach);
}

.reservation-archived {
    background-color: #6c757d !important;
    color: var(--vista-white) !important;
    border: 1px solid #6c757d;
}

/* Specific column widths for student reservations table */
.student-reservations-table th:nth-child(1), /* Item Name */
.student-reservations-table td:nth-child(1) {
    width: 25%;
    min-width: 150px;
}

.student-reservations-table th:nth-child(2), /* Quantity */
.student-reservations-table td:nth-child(2) {
    width: 10%;
    min-width: 70px;
    text-align: center;
}

.student-reservations-table th:nth-child(3), /* Location */
.student-reservations-table td:nth-child(3) {
    width: 15%;
    min-width: 100px;
    text-align: center;
}

.student-reservations-table th:nth-child(4), /* Reserved Date */
.student-reservations-table td:nth-child(4) {
    width: 15%;
    min-width: 110px;
    text-align: center;
}

.student-reservations-table th:nth-child(5), /* Status */
.student-reservations-table td:nth-child(5) {
    width: 15%;
    min-width: 100px;
    text-align: center;
}

.student-reservations-table th:nth-child(6), /* Actions */
.student-reservations-table td:nth-child(6) {
    width: 20%;
    min-width: 120px;
    text-align: center;
}

/* Quantity badge styling */
.badge.bg-info {
    background-color: var(--vista-blue) !important;
    color: var(--vista-white) !important;
    font-weight: 700;
    font-size: 0.8rem;
}

/* Button group styling */
.btn-group-sm .btn {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.2rem;
}

.btn-group .btn {
    white-space: nowrap;
    margin: 0 1px;
}

.btn-group .btn i {
    font-size: 0.8rem;
}

/* Responsive button text */
@media (max-width: 768px) {
    .btn-group .btn {
        font-size: 0.65rem;
        padding: 0.15rem 0.3rem;
    }
    
    .btn-group .btn .btn-text {
        display: none;
    }
}

/* Action buttons with Vista colors */
.btn-success {
    background-color: var(--vista-coral) !important;
    border-color: var(--vista-coral) !important;
    color: var(--vista-white) !important;
}

.btn-success:hover {
    background-color: var(--vista-peach) !important;
    border-color: var(--vista-peach) !important;
    color: var(--vista-white) !important;
}

.btn-danger {
    background-color: var(--vista-grey) !important;
    border-color: var(--vista-grey) !important;
    color: var(--vista-blue) !important;
}

.btn-danger:hover {
    background-color: #999 !important;
    border-color: #999 !important;
    color: var(--vista-white) !important;
}

.btn-warning {
    background-color: var(--vista-peach) !important;
    border-color: var(--vista-peach) !important;
    color: var(--vista-white) !important;
}

.btn-warning:hover {
    background-color: var(--vista-coral) !important;
    border-color: var(--vista-coral) !important;
    color: var(--vista-white) !important;
}

.btn-info {
    background-color: var(--vista-blue) !important;
    border-color: var(--vista-blue) !important;
    color: var(--vista-white) !important;
}

.btn-info:hover {
    background-color: var(--vista-peach) !important;
    border-color: var(--vista-peach) !important;
    color: var(--vista-white) !important;
}

/* Small button spacing */
.btn-sm {
    margin: 0 2px;
}

/* Simple Search Bar Styling */
.search-input-group .input-group-text {
    background-color: var(--vista-coral);
    border-color: var(--vista-coral);
    color: var(--vista-white);
}

.search-input-group .form-control {
    border-color: var(--vista-coral);
}

.search-input-group .form-control:focus {
    border-color: var(--vista-coral);
    box-shadow: 0 0 0 0.25rem rgba(211, 112, 90, 0.25);
}

.search-input-group .btn-outline-secondary {
    border-color: var(--vista-coral);
    color: var(--vista-coral);
}

.search-input-group .btn-outline-secondary:hover {
    background-color: var(--vista-coral);
    border-color: var(--vista-coral);
    color: var(--vista-white);
}