/* Custom CSS for Slot Management System */

/* ==================== Toastr Notifications Fix ==================== */
#toast-container {
    z-index: 99999 !important;
}
#toast-container > div {
    opacity: 1 !important;
    box-shadow: 0 8px 26px -4px rgba(20,20,20,.25) !important;
}
#toast-container > .toast-success {
    background-color: #82d616 !important;
    color: #fff !important;
}
#toast-container > .toast-error {
    background-color: #ea0606 !important;
    color: #fff !important;
}
#toast-container > .toast-info {
    background-color: #17c1e8 !important;
    color: #fff !important;
}
#toast-container > .toast-warning {
    background-color: #fbcf33 !important;
    color: #344767 !important;
}
.toast-message, .toast-title {
    color: inherit !important;
}

/* ==================== Required Field Asterisk ==================== */
.form-label.required::after,
label.required::after {
    content: " *";
    color: #ea0606;
    font-weight: bold;
}

/* ==================== FullCalendar Popover Fix ==================== */
.fc-popover {
    z-index: 9999 !important;
    max-height: 400px !important;
    display: flex;
    flex-direction: column;
}
.fc-popover .fc-popover-body {
    overflow-y: auto !important;
    max-height: 320px !important;
    flex: 1;
}
.fc-popover .fc-popover-header {
    flex-shrink: 0;
    cursor: pointer;
}
.fc-more-popover {
    border-radius: 0.75rem !important;
    box-shadow: 0 8px 26px -4px rgba(20,20,20,.25) !important;
}

/* Status Badges */
.status-available {
    background-color: #82d616;
    color: white;
}

.status-booked {
    background-color: #ea0606;
    color: white;
}

.status-partially-booked {
    background-color: #fbcf33;
    color: #344767;
}

.status-blocked {
    background-color: #8392ab;
    color: white;
}

.status-pending {
    background-color: #17c1e8;
    color: white;
}

.status-confirmed {
    background-color: #82d616;
    color: white;
}

.status-completed {
    background-color: #344767;
    color: white;
}

.status-cancelled {
    background-color: #ea0606;
    color: white;
}

.status-no-show {
    background-color: #ff667c;
    color: white;
}

.status-in-progress {
    background-color: #7928ca;
    color: white;
}

/* Calendar Styles */
.fc {
    font-family: 'Open Sans', sans-serif;
}

.fc .fc-toolbar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--soft-dark);
}

.fc .fc-button {
    background-image: linear-gradient(310deg, #7928ca 0%, #ff0080 100%);
    border: none;
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-radius: var(--soft-border-radius-lg);
    text-transform: capitalize;
}

.fc .fc-button:hover {
    opacity: 0.9;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background-image: linear-gradient(310deg, #5a1f99 0%, #cc0066 100%);
}

.fc .fc-daygrid-day {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.fc .fc-daygrid-day:hover {
    background-color: rgba(121, 40, 202, 0.05);
}

.fc .fc-daygrid-day.fc-day-today {
    background-color: rgba(121, 40, 202, 0.1);
}

.fc .fc-event {
    border: none;
    border-radius: var(--soft-border-radius);
    padding: 2px 6px;
    font-size: 0.75rem;
    cursor: pointer;
}

.fc .fc-event.event-available {
    background-color: #82d616;
}

.fc .fc-event.event-booked {
    background-color: #ea0606;
}

.fc .fc-event.event-partially-booked {
    background-color: #fbcf33;
    color: #344767;
}

.fc .fc-event.event-blocked {
    background-color: #8392ab;
}

.fc .fc-event.event-holiday {
    background-color: #ff667c;
}

.fc-timegrid-slot {
    height: 30px !important;
}

/* Slot Card */
.slot-card {
    border: 1px solid var(--soft-border-color);
    border-radius: var(--soft-border-radius-lg);
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.15s ease;
    cursor: pointer;
}

.slot-card:hover {
    box-shadow: var(--soft-box-shadow);
    transform: translateY(-2px);
}

.slot-card.available {
    border-left: 4px solid #82d616;
}

.slot-card.booked {
    border-left: 4px solid #ea0606;
    opacity: 0.7;
}

.slot-card.partially-booked {
    border-left: 4px solid #fbcf33;
}

.slot-card.blocked {
    border-left: 4px solid #8392ab;
    opacity: 0.7;
}

.slot-card .slot-time {
    font-weight: 600;
    color: var(--soft-dark);
    font-size: 1rem;
}

.slot-card .slot-info {
    font-size: 0.75rem;
    color: var(--soft-secondary);
}

.slot-card .slot-capacity {
    font-size: 0.75rem;
    color: var(--soft-body-color);
}

/* Appointment Card */
.appointment-card {
    border: 1px solid var(--soft-border-color);
    border-radius: var(--soft-border-radius-lg);
    padding: 1rem;
    margin-bottom: 0.75rem;
    background-color: white;
}

.appointment-card .appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.appointment-card .appointment-code {
    font-weight: 700;
    color: var(--soft-primary);
    font-size: 0.875rem;
}

.appointment-card .appointment-customer {
    font-weight: 600;
    color: var(--soft-dark);
}

.appointment-card .appointment-details {
    font-size: 0.8rem;
    color: var(--soft-secondary);
}

.appointment-card .appointment-actions {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--soft-border-color);
}

/* Working Hours Grid */
.working-hours-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.working-hours-day {
    text-align: center;
    padding: 0.75rem;
    border: 1px solid var(--soft-border-color);
    border-radius: var(--soft-border-radius-lg);
    background-color: white;
}

.working-hours-day.non-working {
    background-color: var(--soft-light);
    opacity: 0.7;
}

.working-hours-day .day-name {
    font-weight: 600;
    color: var(--soft-dark);
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.working-hours-day .day-hours {
    font-size: 0.8rem;
    color: var(--soft-body-color);
}

/* Time Picker */
.time-picker-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-picker-group span {
    color: var(--soft-secondary);
}

/* Date Picker Enhancements */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    cursor: pointer;
}

/* Stats Cards Hover */
.card:hover {
    box-shadow: var(--soft-box-shadow-lg);
}

/* Action Buttons Group */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-buttons .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Quick Actions Cards */
.quick-action-card {
    text-align: center;
    padding: 1.5rem;
    border: 1px solid var(--soft-border-color);
    border-radius: var(--soft-border-radius-lg);
    transition: all 0.15s ease;
    cursor: pointer;
    text-decoration: none;
    color: var(--soft-dark);
    display: block;
}

.quick-action-card:hover {
    background-color: var(--soft-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--soft-box-shadow-lg);
}

.quick-action-card i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

/* Booking Flow Steps */
.booking-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.booking-steps::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 50px;
    right: 50px;
    height: 2px;
    background-color: var(--soft-border-color);
}

.booking-step {
    text-align: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.booking-step .step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--soft-light);
    color: var(--soft-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 0.5rem;
    transition: all 0.3s ease;
}

.booking-step.active .step-number {
    background-image: linear-gradient(310deg, #7928ca 0%, #ff0080 100%);
    color: white;
}

.booking-step.completed .step-number {
    background-color: #82d616;
    color: white;
}

.booking-step .step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--soft-secondary);
}

.booking-step.active .step-label,
.booking-step.completed .step-label {
    color: var(--soft-dark);
}

/* Confirmation Card */
.confirmation-card {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(121, 40, 202, 0.05), rgba(255, 0, 128, 0.05));
    border-radius: var(--soft-border-radius-xl);
}

.confirmation-card .confirmation-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-image: linear-gradient(310deg, #17ad37 0%, #98ec2d 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
}

.confirmation-card .confirmation-code {
    font-size: 2rem;
    font-weight: 700;
    color: var(--soft-primary);
    letter-spacing: 4px;
    margin-bottom: 1rem;
}

/* Report Cards */
.report-stat-card {
    text-align: center;
    padding: 1.5rem;
}

.report-stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--soft-dark);
    margin-bottom: 0.5rem;
}

.report-stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--soft-secondary);
}

.report-stat-card .stat-change {
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.report-stat-card .stat-change.positive {
    color: #82d616;
}

.report-stat-card .stat-change.negative {
    color: #ea0606;
}

/* Filter Panel */
.filter-panel {
    background-color: var(--soft-light);
    border-radius: var(--soft-border-radius-lg);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.filter-panel .filter-title {
    font-weight: 600;
    color: var(--soft-dark);
    margin-bottom: 1rem;
}

/* Toast Customization */
.toast-success {
    background-color: #82d616 !important;
}

.toast-error {
    background-color: #ea0606 !important;
}

.toast-info {
    background-color: #17c1e8 !important;
}

.toast-warning {
    background-color: #fbcf33 !important;
    color: #344767 !important;
}

/* Select2 Styling (if used) */
.select2-container--default .select2-selection--single {
    border: 1px solid var(--soft-border-color);
    border-radius: var(--soft-border-radius-lg);
    height: calc(2.5rem + 2px);
    padding: 0.375rem 0.75rem;
}



/* Responsive Adjustments */
@media (max-width: 768px) {
    .working-hours-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .booking-steps {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .booking-steps::before {
        display: none;
    }
    
    .booking-step {
        display: flex;
        align-items: center;
        margin-bottom: 1rem;
    }
    
    .booking-step .step-number {
        margin: 0 1rem 0 0;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
}

/* Print Styles */
@media print {
    .sidenav,
    .navbar-main,
    .btn,
    .action-buttons {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--soft-border-radius);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* Notification Dropdown */
#notificationList {
    max-height: 400px;
    overflow-y: auto;
    min-width: 300px;
}

.notification-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--soft-border-color);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.notification-item:hover {
    background-color: var(--soft-light);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background-color: rgba(121, 40, 202, 0.05);
}

.notification-time {
    font-size: 0.7rem;
    color: var(--soft-secondary);
}

.global-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.7);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}