﻿/* FullCalendar Custom Styles */

/* Calendar container */
#calendar {
    max-width: 100%;
    margin: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* FullCalendar overrides */
.fc {
    --fc-border-color: #e9ecef;
    --fc-button-text-color: #fff;
    --fc-button-bg-color: #007bff; /*gri*/
    --fc-button-border-color: #007bff;
    --fc-button-hover-bg-color: #007bff; /*albastru*/
    --fc-button-hover-border-color: #004085;
    --fc-button-active-bg-color: #007bff; /*albastru*/
    --fc-button-active-border-color: #002752;
}

.fc-toolbar {
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fc-toolbar-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #495057;
    text-transform: capitalize;
}

.fc-button {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

    .fc-button:not(:disabled):hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

.fc-button-primary:not(:disabled):active,
.fc-button-primary:not(:disabled).fc-button-active {
    background-color: var(--fc-button-active-bg-color);
    border-color: var(--fc-button-active-border-color);
}

.fc-button:focus {
    outline: none !important;
    box-shadow: none !important;
}


/* Calendar grid */
.fc-daygrid-day {
    background: #fff;
    transition: background-color 0.2s ease;
    text-decoration: none !important;
}

    .fc-daygrid-day:hover {
        background: #f8f9fa;
    }

.fc-daygrid-day-top {
    padding: 0.5rem;
}

.fc-daygrid-day-number {
    font-weight: 600;
    color: #495057;
    padding: 0.25rem;
    border-radius: 50%;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration:none;
}

.fc-day-today .fc-daygrid-day-number {
    background: #007bff;
    color: white;
    font-weight: 700;
    text-decoration:none !important;
}

.fc-day-other .fc-daygrid-day-number {
    color: #adb5bd;
    text-decoration: none;
}

.fc-col-header-cell a,
.fc-col-header-cell {
    text-decoration: none !important;
}
    /* Events styling */
    .fc-event {
    border: none !important;
    border-radius: 0.375rem !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin: 1px 0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

    .fc-event:hover {
        transform: scale(1.02) !important;
        box-shadow: 0 3px 8px rgba(0,0,0,0.15) !important;
        z-index: 999 !important;
    }

.fc-event-title {
    font-weight: 600 !important;
    padding: 0.125rem 0.25rem !important;
}

.fc-event-time {
    font-weight: 400 !important;
    opacity: 0.9 !important;
}

/* Different event types */
.fc-event.reservation-checkin {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    border-left: 4px solid #155724 !important;
}

.fc-event.reservation-checkout {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%) !important;
    color: #212529 !important;
    border-left: 4px solid #856404 !important;
}

.fc-event.reservation-active {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%) !important;
    border-left: 4px solid #004085 !important;
}

.fc-event.reservation-multi-day {
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%) !important;
    border-left: 4px solid #4e2a84 !important;
}

/* Time grid view styles */
.fc-timegrid-slot {
    height: 2rem;
}

.fc-timegrid-event {
    border-radius: 0.25rem !important;
    font-size: 0.8rem !important;
}

    .fc-timegrid-event .fc-event-title {
        font-weight: 600 !important;
    }

/* List view styles */
.fc-list-event {
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}

    .fc-list-event:hover {
        background: #f8f9fa !important;
    }

.fc-list-event-dot {
    border-radius: 50% !important;
    width: 8px !important;
    height: 8px !important;
}

.fc-list-event-title {
    font-weight: 500 !important;
}
.fc-list-day-side-text {
    text-decoration: none !important;
}
.fc-list-day-text {
    text-decoration: none !important;
}

/* Statistics cards */
.stats-container {
    text-align: center;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s ease;
}

    .stat-card:hover {
        background: #e9ecef;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #007bff;
    line-height: 1;
    display: block;
    margin-bottom: 0.25rem;
}

    .stat-number.text-success {
        color: #28a745 !important;
    }

    .stat-number.text-info {
        color: #17a2b8 !important;
    }

    .stat-number.text-warning {
        color: #ffc107 !important;
    }

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    display: block;
}

/* Filter container */
.filter-container {
    padding: 0.5rem;
}

    .filter-container .form-label {
        font-size: 0.875rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: #495057;
    }

    .filter-container .form-select {
        border: 1px solid #ced4da;
        border-radius: 0.375rem;
        transition: all 0.2s ease;
    }

        .filter-container .form-select:focus {
            border-color: #007bff;
            box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
        }

/* View buttons */
.btn-group .btn {
    position: relative;
    transition: all 0.2s ease;
}

    .btn-group .btn.active {
        background-color: #007bff;
        border-color: #007bff;
        color: white;
        box-shadow: 0 2px 4px rgba(0, 123, 255, 0.25);
    }

    .btn-group .btn:not(.active):hover {
        background-color: #f8f9fa;
        border-color: #007bff;
        color: #007bff;
    }

/* Modal enhancements */
.modal-content {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

    .modal-header .modal-title {
        font-weight: 600;
        font-size: 1.1rem;
    }

    .modal-header .btn-close {
        filter: invert(1) grayscale(100%) brightness(200%);
        opacity: 0.8;
    }

        .modal-header .btn-close:hover {
            opacity: 1;
        }

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* Reservation details in modal */
.reservation-detail-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    transition: all 0.2s ease;
}

    .reservation-detail-section:hover {
        background: #e9ecef;
        border-color: #ced4da;
    }

    .reservation-detail-section h6 {
        color: #495057;
        font-weight: 600;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid #007bff;
        display: inline-block;
    }

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

    .detail-row:last-child {
        border-bottom: none;
    }

    .detail-row:hover {
        background: rgba(0, 123, 255, 0.05);
        border-radius: 0.25rem;
        margin: 0 -0.5rem;
        padding: 0.5rem;
    }

.detail-label {
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-value {
    color: #212529;
    font-weight: 500;
}

    .detail-value.fw-bold {
        font-weight: 700 !important;
    }

    .detail-value.text-success {
        color: #28a745 !important;
    }

/* Room badges */
.room-badge {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    color: #495057;
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0.25rem;
    display: inline-block;
    transition: all 0.2s ease;
}

    .room-badge:hover {
        background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
        color: white;
        border-color: #004085;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 123, 255, 0.25);
    }

/* Action buttons in modal */
#modal-actions .btn {
    margin-left: 0.5rem;
    transition: all 0.2s ease;
}

    #modal-actions .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

#modal-actions .btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border-color: #17a2b8;
}

#modal-actions .btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    border-color: #ffc107;
    color: #212529;
}

#modal-actions .btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: #007bff;
}

/* Quick edit form */
#quickEditForm .form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: all 0.2s ease;
}

    #quickEditForm .form-control:focus {
        border-color: #007bff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

#quickEditForm .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Loading states */
.fc-event.loading {
    opacity: 0.6;
    pointer-events: none;
}

    .fc-event.loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 12px;
        height: 12px;
        margin: -6px 0 0 -6px;
        border: 2px solid rgba(255,255,255,0.3);
        border-top: 2px solid rgba(255,255,255,0.9);
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive design */
@media (max-width: 1200px) {
    .stat-number {
        font-size: 1.5rem;
    }

    .fc-toolbar-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 992px) {
    .fc-toolbar {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .stat-card {
        margin-bottom: 1rem;
        padding: 0.75rem;
    }

    .stat-number {
        font-size: 1.25rem;
    }

    .filter-container {
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    #calendar {
        margin: 0.5rem;
    }

    .fc-button {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .fc-toolbar-title {
        font-size: 1.1rem;
    }

    .fc-event {
        font-size: 0.65rem !important;
    }

    .fc-daygrid-event {
        margin: 0.5px 0 !important;
    }

    .stat-number {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .reservation-detail-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .room-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        margin: 0.125rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .fc-event {
        font-size: 0.6rem !important;
    }

    .fc-event-title {
        padding: 0.0625rem 0.125rem !important;
    }

    .stat-number {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .reservation-detail-section {
        padding: 0.75rem;
    }

    #modal-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

        #modal-actions .btn {
            margin-left: 0;
            width: 100%;
        }
}

/* Print styles */
@media print {
    .btn,
    .modal,
    .fc-toolbar,
    .filter-container {
        display: none !important;
    }

    #calendar {
        margin: 0;
    }

    .fc-event {
        background: #f0f0f0 !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }

    .stat-card {
        border: 1px solid #000;
        background: white !important;
    }
}

/* Accessibility improvements */
.fc-event:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Animation for smooth transitions */
.fc-event,
.stat-card,
.room-badge,
.btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover effects for better interactivity */
.fc-daygrid-day:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.fc-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
