/* Hostel UI Enhancements - Scoped to .hostel-module */

/* 
   UI REFINEMENT: COMPACT WAVE TAB
   Rules:
   1. Compact width for the bar.
   2. Centered layout.
   3. Concave "wave" dip for active icon.
*/

.hostel-tabs-container {
    padding-top: 40px;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    background: transparent;
}

/* 1. Main container: Reduced Width */
.hostel-tabs-container .nav-tabs {
    position: relative;
    width: 100%;
    max-width: 650px;
    height: 75px;
    background: #ffffff;
    border: none;
    border-radius: 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.hostel-tabs-container .nav-item {
    flex: 1;
    list-style: none;
    display: flex;
    justify-content: center;
    height: 100%;
}

.hostel-tabs-container .nav-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #1e293b;
    /* High contrast Dark Slate-800 */
    font-weight: 500;
    /* Bold for sharp legibility */
    text-decoration: none;
    transition: all 0.3s ease;
    z-index: 10;
}

/* 4. Circle Element */
.hostel-tabs-container .nav-link i {
    font-size: 1.35rem;
    color: #334155;
    /* High contrast Dark Slate for icons */
    transition: all 0.3s ease;
}

.hostel-tabs-container .nav-link span {
    font-size: 0.82rem;
    margin-top: 5px;
    letter-spacing: 0.3px;
}

/* ACTIVE STATE: WAVE CUT-OUT */

.hostel-tabs-container .nav-link.active {
    background: transparent !important;
}

.hostel-tabs-container .nav-link.active i {
    position: absolute;
    top: -30px;
    width: 60px;
    height: 60px;
    background: #49b6d7;
    /* Sky Blue requested */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(73, 182, 215, 0.4);
    font-size: 1.4rem;
}

.hostel-tabs-container .nav-link.active span {
    color: #49b6d7;
    /* Sync label with Sky Blue */
    font-weight: 700;
    /* Reduced from 900 to feel less chunky */
    transform: translateY(8px);
}

/* Hover Support: Both icon and text change color */
.hostel-tabs-container .nav-link:not(.active):hover i,
.hostel-tabs-container .nav-link:not(.active):hover span {
    color: #49b6d7;
    transform: translateY(-1px);
}

/* Info Cards: Compact Horizontal Design with Top-Circle */
.hostel-module .info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    /* Wider for horizontal layout */
    gap: 35px 15px;
    margin-top: 35px;
}

.hostel-module .info-card {
    position: relative;
    background: #ffffff;
    border-radius: 15px;
    padding: 30px 20px 15px;
    /* Reduced vertical padding */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    border: none;
    transition: all 0.3s ease;
}

/* Flex container for content */
.hostel-module .info-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.hostel-module .info-card-text {
    flex: 1;
}

.hostel-module .info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

/* Overlapping Top Icon Circle - Smaller & Themed */
.hostel-module .info-card-icon {
    position: absolute;
    top: -20px;
    left: 20px;
    /* Moved to left for better horizontal flow */
    width: 40px;
    height: 40px;
    border-radius: 12px;
    /* Slightly squircle for modern look */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    z-index: 5;
    transition: all 0.3s ease;
}

.hostel-module .info-card-icon i {
    font-size: 1rem;
    color: #ffffff !important;
}

/* Typography Refinement */
.hostel-module .info-card .text-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 0px;
    letter-spacing: 0.5px;
}

.hostel-module .info-card .text-sublabel {
    font-size: 0.6rem;
    font-weight: 600;
    color: #95a5a6;
}

/* Stat Number: Moved to right, softer weight & modern slate color */
.hostel-module .info-card h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 500;
    /* Regular/Medium weight */
    color: #334155;
    /* Modern Slate-700 instead of old-school gray */
    line-height: 1;
}

/* COLOR ACCENTS */
.hostel-module .info-card.primary .info-card-icon {
    background: #4e73df;
    box-shadow: 0 5px 12px rgba(78, 115, 223, 0.3);
}

.hostel-module .info-card.primary .text-label {
    color: #4e73df;
}

.hostel-module .info-card.primary::after {
    background: #4e73df;
}

.hostel-module .info-card.success .info-card-icon {
    background: #1cc88a;
    box-shadow: 0 5px 12px rgba(28, 200, 138, 0.3);
}

.hostel-module .info-card.success .text-label {
    color: #1cc88a;
}

.hostel-module .info-card.success::after {
    background: #1cc88a;
}

.hostel-module .info-card.warning .info-card-icon {
    background: #f6c23e;
    box-shadow: 0 5px 12px rgba(246, 194, 62, 0.3);
}

.hostel-module .info-card.warning .text-label {
    color: #f6c23e;
}

.hostel-module .info-card.warning::after {
    background: #f6c23e;
}

.hostel-module .info-card.danger .info-card-icon {
    background: #e74a3b;
    box-shadow: 0 5px 12px rgba(231, 74, 59, 0.3);
}

.hostel-module .info-card.danger .text-label {
    color: #e74a3b;
}

.hostel-module .info-card.danger::after {
    background: #e74a3b;
}

/* Info Cyan (#36b9cc) */
.hostel-module .info-card.info .info-card-icon {
    background: #36b9cc;
    box-shadow: 0 8px 15px rgba(54, 185, 204, 0.3);
}

.hostel-module .info-card.info .text-label {
    color: #36b9cc;
}

.hostel-module .info-card.info::after {
    background: #36b9cc;
}

/* Small indicator bar */
.hostel-module .info-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    width: 25px;
    height: 3px;
    border-radius: 5px 5px 0 0;
}

.hostel-module .text-primary {
    color: #4e73df !important;
}

.hostel-module .text-success {
    color: #1cc88a !important;
}

.hostel-module .text-warning {
    color: #f6c23e !important;
}

.hostel-module .text-danger {
    color: #e74a3b !important;
}

.hostel-module .text-info {
    color: #36b9cc !important;
}

/* Global GridView Alignment */
.hostel-module .table-standard th,
.hostel-module .table-standard td {
    text-align: center !important;
    vertical-align: middle !important;
}

/* Action column refinement */
.hostel-module .action-column {
    white-space: nowrap;
    width: 180px !important;
}

.hostel-module .badge {
    display: inline-block;
}

/* Empty State Styling */
.hostel-module .empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: #ffffff;
}

.hostel-module .empty-state-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: #f8fafc;
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.hostel-module .empty-state-icon i {
    font-size: 2.5rem;
    color: #94a3b8;
}

.hostel-module .empty-state h5 {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.hostel-module .empty-state p {
    color: #64748b;
    font-size: 0.9rem;
    max-width: 400px;
    margin: 0 auto;
}

/* Utilities */
.letter-spacing-1 {
    letter-spacing: 1px;
}

.fw-500 {
    font-weight: 500;
}

.fw-600 {
    font-weight: 600;
}

.bg-light-soft {
    background-color: #f8fafc;
}

/* Select2 Visibility & Theme Fixes */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #1e293b !important;
    line-height: 36px;
    /* Standard height */
}

.select2-container--default .select2-selection--single {
    height: 38px !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}

/* Multiple Select (Students) */
.hostel-module .select2-container--default .select2-selection--multiple {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2px 8px;
    min-height: 38px;
}

.hostel-module .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #0369a1;
    border-radius: 6px;
    padding: 2px 8px;
    margin-top: 4px;
    font-size: 0.85rem;
}

.hostel-module .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #0369a1;
    margin-right: 5px;
    border-right: 1px solid rgba(3, 105, 161, 0.2);
}

.hostel-module .select2-container--default.select2-container--focus .select2-selection--multiple,
.hostel-module .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #49b6d7 !important;
    box-shadow: 0 0 0 0.2rem rgba(73, 182, 215, 0.15);
}

/* Cinema-Style Room Selector */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.room-box {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    position: relative;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.room-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.room-box.selected {
    border-color: #0d6efd !important;
    background-color: #e7f1ff !important;
    transform: scale(1.05);
    z-index: 1;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.room-box.status-green {
    background-color: #d1e7dd;
    color: #0f5132;
}

.room-box.status-orange {
    background-color: #fff3cd;
    color: #664d03;
}

.room-box.status-red {
    background-color: #f8d7da;
    color: #842029;
    cursor: not-allowed;
    opacity: 0.8;
}

.room-box.status-grey {
    background-color: #e2e3e5;
    color: #41464b;
    cursor: not-allowed;
    opacity: 0.6;
}

.room-box .room-name {
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.bed-icons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: center;
    width: 100%;
    padding: 0 5px;
}

.bed-icon {
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.bed-icon.occupied {
    color: #2e8061 !important;
    /* Force Green as requested */
}

.bed-icon.available {
    color: #9b9b9b !important;
    /* Force Grey as requested */
    opacity: 1;
}

.room-legend .legend-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
}

/* Tooltip style for grey rooms */
.room-box.status-grey::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.room-box.status-grey:hover::after {
    visibility: visible;
    opacity: 1;
}