/**
 * GuestRoom.ro - Main Application Styles
 */

/* =====================================================
   BASE STYLES
   ===================================================== */

html, body {
    height: 100%;
    overflow: hidden;
}

:root {
    --topbar-height: 64px;
    --submenu-height: 56px;
    --accent-color: #14b8a6;
    --accent-color-light: #5eead4;
    --accent-color-soft: rgba(20, 184, 166, 0.2);
    --accent-color-glass: rgba(94, 234, 212, 0.32);

    /* Status colors */
    --status-10-bg: #f97316;
    --status-20-bg: #2563eb;
    --status-30-bg: #16a34a;
    --status-40-bg: #e2e8f0;
    --status-50-bg: #ef4444;
    --status-60-bg: #ec4899;
    --status-70-bg: #fee2e2;
}

/* =====================================================
   SCROLLBAR STYLES
   ===================================================== */

* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

.dark *::-webkit-scrollbar-thumb {
    background-color: #475569;
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =====================================================
   BUTTON STYLES
   ===================================================== */

.btn-accent {
    background-color: var(--accent-color);
    border: 1px solid var(--accent-color);
    color: #ffffff;
    transition: background-color 0.2s ease, filter 0.2s ease;
}

.btn-accent:hover {
    filter: brightness(0.92);
}

.focus-accent:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 0 4px var(--accent-color-light);
}

.dynamic-gradient {
    background-image: linear-gradient(135deg, var(--accent-color-light), var(--accent-color));
    color: #ffffff;
}

/* =====================================================
   NAVIGATION STYLES
   ===================================================== */

.nav-link {
    color: #4b5563;
    background-color: transparent;
}

.nav-link:hover {
    color: #1f2937;
    background-color: #f3f4f6;
}

.dark .nav-link {
    color: #d1d5db;
}

.dark .nav-link:hover {
    color: #ffffff;
    background-color: rgba(55, 65, 81, 0.5);
}

.nav-link-active {
    background-color: var(--accent-color) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px var(--accent-color-soft);
}

.nav-link-active:hover {
    background-color: var(--accent-color) !important;
    color: #ffffff !important;
    filter: brightness(1.1);
}

/* Dropdown Menu */
.dropdown-menu {
    animation: dropdownSlide 0.15s ease-out;
    backdrop-filter: blur(8px);
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    position: relative;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background-color: var(--accent-color);
    border-radius: 0 2px 2px 0;
    transition: height 0.15s ease;
}

.dropdown-item:hover::before {
    height: 60%;
}

/* Legacy support */
.menu-link-active {
    background-color: var(--accent-color);
    color: #ffffff;
}

/* =====================================================
   FULLSCREEN BUTTON
   ===================================================== */

#fullscreen-btn .icon-swap {
    display: inline-flex;
    position: relative;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
}

#fullscreen-btn .icon-state {
    position: absolute;
    inset: 0;
    width: 1.25rem;
    height: 1.25rem;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

#fullscreen-btn .icon-state.active {
    opacity: 1;
    transform: scale(1);
}

#fullscreen-btn svg {
    display: block;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-enter {
    animation: fadeIn 0.2s ease, slideIn 0.2s ease;
}

.settings-dropdown {
    animation: slideIn 0.15s ease;
}

/* =====================================================
   RESERVATION STYLES
   ===================================================== */

.reservation {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    border: 1px solid rgba(255,255,255,0.2);
}

.reservation:hover {
    transform: none;
    outline: 2px solid rgba(255,255,255,0.5);
    outline-offset: -2px;
    z-index: 20 !important;
}

.reservation.status-40:hover,
.reservation.status-70:hover {
    outline: 2px solid rgba(51,65,85,0.4);
    outline-offset: -2px;
}

.reservation.dragging {
    opacity: 0.4;
    transform: scale(0.95);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    z-index: 100 !important;
    pointer-events: none;
}

.reservation.resizing {
    transition: none;
    opacity: 0.4;
    transform: scale(0.98);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

body.resizing-active {
    cursor: ew-resize !important;
}

body.resizing-active * {
    cursor: ew-resize !important;
}

/* Size-based reservation adjustments */
.reservation[style*="width: "][style*="px"] {
    overflow: hidden;
}

/* =====================================================
   RESERVATION STATUS STYLES (Colored backgrounds)
   ===================================================== */

.reservation.status-10 {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(15, 23, 42, 0.08)), var(--status-10-bg);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.24);
}

.reservation.status-20 {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(15, 23, 42, 0.08)), var(--status-20-bg);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.24);
}

.reservation.status-30 {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(15, 23, 42, 0.08)), var(--status-30-bg);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.24);
}

.reservation.status-50 {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(15, 23, 42, 0.12)), var(--status-50-bg);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.24);
}

.reservation.status-60 {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(15, 23, 42, 0.12)), var(--status-60-bg);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.24);
}

/* Checked Out - simple gray */
.reservation.status-40 {
    background: #e2e8f0;
    color: #64748b;
    border-color: #cbd5e1;
}

.dark .reservation.status-40 {
    background: #374151;
    color: #9ca3af;
    border-color: #4b5563;
}

/* Blocked - simple light red */
.reservation.status-70 {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.dark .reservation.status-70 {
    background: rgba(127, 29, 29, 0.3);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

.reservation.status-40 .reservation-badge,
.reservation.status-70 .reservation-badge {
    background-color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.65);
    color: inherit;
}

/* =====================================================
   RESERVATION DATES LABEL
   ===================================================== */

.reservation-dates-label {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.9);
    color: #334155;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dark .reservation-dates-label {
    background: rgba(31, 41, 55, 0.9);
    color: #e5e7eb;
}

.reservation.status-40 .reservation-dates-label,
.reservation.status-70 .reservation-dates-label {
    background: rgba(255, 255, 255, 0.85);
    color: #334155;
}

.dark .reservation.status-40 .reservation-dates-label,
.dark .reservation.status-70 .reservation-dates-label {
    background: rgba(31, 41, 55, 0.9);
    color: #e5e7eb;
}

/* =====================================================
   STATUS BADGE (Colored indicator)
   ===================================================== */

.reservation-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.reservation-status-badge.status-10 {
    background-color: rgba(249, 115, 22, 0.15);
    color: #ea580c;
}
.dark .reservation-status-badge.status-10 {
    background-color: rgba(249, 115, 22, 0.25);
    color: #fb923c;
}

.reservation-status-badge.status-20 {
    background-color: rgba(37, 99, 235, 0.15);
    color: #2563eb;
}
.dark .reservation-status-badge.status-20 {
    background-color: rgba(37, 99, 235, 0.25);
    color: #60a5fa;
}

.reservation-status-badge.status-30 {
    background-color: rgba(22, 163, 74, 0.15);
    color: #16a34a;
}
.dark .reservation-status-badge.status-30 {
    background-color: rgba(22, 163, 74, 0.25);
    color: #4ade80;
}

.reservation-status-badge.status-40 {
    background-color: rgba(100, 116, 139, 0.15);
    color: #64748b;
}
.dark .reservation-status-badge.status-40 {
    background-color: rgba(100, 116, 139, 0.25);
    color: #94a3b8;
}

.reservation-status-badge.status-50 {
    background-color: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}
.dark .reservation-status-badge.status-50 {
    background-color: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.reservation-status-badge.status-60 {
    background-color: rgba(236, 72, 153, 0.15);
    color: #db2777;
}
.dark .reservation-status-badge.status-60 {
    background-color: rgba(236, 72, 153, 0.25);
    color: #f472b6;
}

.reservation-status-badge.status-70 {
    background-color: rgba(185, 28, 28, 0.15);
    color: #b91c1c;
}
.dark .reservation-status-badge.status-70 {
    background-color: rgba(185, 28, 28, 0.25);
    color: #fca5a5;
}

/* =====================================================
   RESERVATION BADGES
   ===================================================== */

.reservation-badges {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 3px;
    align-items: center;
}

.reservation-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    color: #ffffff;
    letter-spacing: 0.01em;
    flex-shrink: 0;
}

.reservation-badge.compact {
    padding: 2px;
    width: 18px;
    height: 18px;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.reservation-badge svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.reservation-badge.compact svg {
    width: 11px;
    height: 11px;
}

.reservation-badges.compact {
    gap: 2px;
}

.reservation-badge[data-purpose="business"] {
    background-color: var(--accent-color-soft);
}

/* =====================================================
   CALENDAR CELLS
   ===================================================== */

.half-cell {
    position: relative;
}

.half-cell.pm {
    border-left: 1px solid rgba(209, 213, 219, 0.5);
}

.dark .half-cell.pm {
    border-left: 1px solid rgba(55, 65, 81, 0.7);
}

/* Occupied cells - no selection allowed */
.half-cell.occupied {
    cursor: default;
    pointer-events: none;
}

/* Hotel day preview styling */
.hotel-day-preview {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.hotel-day-preview .expand-arrow {
    animation: expandPulse 1.2s ease-in-out infinite;
}

@keyframes expandPulse {
    0%, 100% {
        opacity: 0.5;
        transform: translateX(0);
    }
    50% {
        opacity: 1;
        transform: translateX(3px);
    }
}

/* Selection styles */
.half-cell.selecting {
    background-color: var(--accent-color-soft);
    box-shadow: inset 0 2px 0 0 var(--accent-color), inset 0 -2px 0 0 var(--accent-color);
    z-index: 2;
}

.half-cell.pm.selecting {
    box-shadow: inset 2px 0 0 0 var(--accent-color), inset 0 2px 0 0 var(--accent-color), inset 0 -2px 0 0 var(--accent-color);
}

.half-cell.am.selecting {
    box-shadow: inset -2px 0 0 0 var(--accent-color), inset 0 2px 0 0 var(--accent-color), inset 0 -2px 0 0 var(--accent-color);
}

.half-cell.am.selecting::before {
    content: '';
    position: absolute;
    left: -2px;
    top: -1px;
    bottom: -1px;
    width: 4px;
    background-color: var(--accent-color-soft);
    z-index: 3;
}

/* Resize preview */
.half-cell.resize-preview {
    background-color: var(--accent-color-soft);
    box-shadow: inset 0 2px 0 0 var(--accent-color), inset 0 -2px 0 0 var(--accent-color);
    z-index: 2;
}

.half-cell.resize-preview.resize-start {
    box-shadow: inset 2px 0 0 0 var(--accent-color), inset 0 2px 0 0 var(--accent-color), inset 0 -2px 0 0 var(--accent-color);
}

.half-cell.resize-preview.resize-end {
    box-shadow: inset -2px 0 0 0 var(--accent-color), inset 0 2px 0 0 var(--accent-color), inset 0 -2px 0 0 var(--accent-color);
}

/* Drop preview */
.half-cell.drop-preview {
    background-color: var(--accent-color-soft);
    box-shadow: inset 0 2px 0 0 var(--accent-color), inset 0 -2px 0 0 var(--accent-color);
    z-index: 2;
}

.half-cell.drop-preview.drop-start {
    box-shadow: inset 2px 0 0 0 var(--accent-color), inset 0 2px 0 0 var(--accent-color), inset 0 -2px 0 0 var(--accent-color);
}

.half-cell.drop-preview.drop-end {
    box-shadow: inset -2px 0 0 0 var(--accent-color), inset 0 2px 0 0 var(--accent-color), inset 0 -2px 0 0 var(--accent-color);
}

.half-cell.drop-available {
    background-color: rgba(34, 197, 94, 0.08);
}

/* =====================================================
   DATE LABELS
   ===================================================== */

.date-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.95);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.dark .date-label {
    background: rgba(31, 41, 55, 0.95);
    color: var(--accent-color-light);
}


/* =====================================================
   DATE HEADER
   ===================================================== */

.date-header {
    position: relative;
    overflow: hidden;
    transition: color 0.2s ease;
    height: 60px;
    vertical-align: middle;
}

.date-header::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%) translateY(4px);
    width: 36px;
    max-width: calc(100% - 24px);
    height: 3px;
    border-radius: 9999px;
    background: transparent;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.date-header.is-today,
.date-header.highlighted {
    color: var(--accent-color);
}

.dark .date-header.is-today,
.dark .date-header.highlighted {
    color: var(--accent-color-light);
}

.date-header.is-today::after,
.date-header.highlighted::after {
    background: var(--accent-color);
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    box-shadow: 0 6px 12px var(--accent-color-soft);
}

.dark .date-header.is-today::after,
.dark .date-header.highlighted::after {
    background: var(--accent-color-light);
    box-shadow: 0 6px 12px var(--accent-color-soft);
}

.date-header.is-today::after {
    width: 100%;
    max-width: 100%;
    left: 0;
    transform: translateY(0);
}

/* =====================================================
   ROOM STYLES
   ===================================================== */

/* Row highlight on hover */
.room-row.row-highlighted {
    background-color: rgba(156, 163, 175, 0.08);
}

.dark .room-row.row-highlighted {
    background-color: rgba(75, 85, 99, 0.2);
}

.room-cell.row-highlighted {
    background-color: rgba(156, 163, 175, 0.12) !important;
    border-right-width: 3px !important;
}

.dark .room-cell.row-highlighted {
    background-color: rgba(75, 85, 99, 0.3) !important;
}

/* Legacy highlight classes */
.room-row.highlighted {
    position: relative;
}

.dark .room-row.highlighted {
    position: relative;
}

.room-cell.highlighted {
    position: relative;
}

.dark .room-cell.highlighted {
    position: relative;
}

#rooms-header,
.room-cell {
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    box-sizing: border-box;
}

#calendar-table {
    table-layout: auto;
}

/* =====================================================
   VIEW MODES
   ===================================================== */

/* Compact view */
.compact-view .room-row {
    height: 36px !important;
    padding: 6px 12px !important;
}

.compact-view .date-cell {
    height: 36px !important;
}

.compact-view .reservation {
    padding: 4px 8px !important;
    font-size: 11px !important;
}

/* 30-day view */
.view-30 .date-column {
    min-width: 50px !important;
}

.view-30 .date-header {
    min-width: 50px !important;
    font-size: 10px !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
}

/* =====================================================
   DASHBOARD STYLES
   ===================================================== */

.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dark .stat-card {
    background: #1f2937;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.dark .stat-label {
    color: #9ca3af;
}
