/* assets/css/style.css - Custom styles for BookWise */

/* Global Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --header-height: 60px;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
    --transition-speed: 0.3s;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Nunito', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding-top: var(--header-height);
    background-color: var(--body-bg, #f8f9fa);
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Fix sidebar and footer overlap */
.content-container {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-speed);
    width: 100%;
}

.footer {
    flex-shrink: 0;
    margin-top: auto;
    width: 100%;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 1.5rem;
    width: calc(100% - var(--sidebar-width));
    transition: margin-left var(--transition-speed), width var(--transition-speed);
}

body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

/* Mobile-specific layout */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    body.sidebar-collapsed .main-content {
        margin-left: 0;
        width: 100%;
    }
}

/* Cards */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.card-header {
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.02);
}

/* Stats Cards */
.stats-card {
    border-left: 4px solid var(--primary-color);
    border-radius: 0.5rem;
}

.stats-card.stats-primary {
    border-color: var(--primary-color);
}

.stats-card.stats-success {
    border-color: var(--success-color);
}

.stats-card.stats-warning {
    border-color: var(--warning-color);
}

.stats-card.stats-danger {
    border-color: var(--danger-color);
}

.stats-card .stats-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.75rem;
}

.stats-card .stats-icon.stats-primary {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

.stats-card .stats-icon.stats-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: var(--success-color);
}

.stats-card .stats-icon.stats-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.stats-card .stats-icon.stats-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.stats-card .stats-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.stats-card .stats-label {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Form Styling */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    font-weight: 600;
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Tables */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table th {
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Booking Page */
.booking-page-container {
    max-width: 800px;
    margin: 0 auto;
}

.booking-header {
    text-align: center;
    padding: 2rem 0;
}

.booking-header img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.booking-type-card {
    cursor: pointer;
    border: 1px solid #ddd;
    transition: all 0.2s;
}

.booking-type-card:hover, .booking-type-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.1);
}

/* Calendar */
.calendar-container {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    padding: 1rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-month {
    font-size: 1.25rem;
    font-weight: 600;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day-name {
    text-align: center;
    font-weight: 600;
    padding: 0.5rem;
}

.calendar-day {
    text-align: center;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.calendar-day:hover:not(.disabled) {
    background-color: rgba(13, 110, 253, 0.1);
}

.calendar-day.today {
    border: 1px solid var(--primary-color);
}

.calendar-day.selected {
    background-color: var(--primary-color);
    color: #fff;
}

.calendar-day.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
    margin-top: 1rem;
}

.time-slot {
    text-align: center;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.25rem;
    border: 1px solid #ddd;
    transition: all 0.2s;
}

.time-slot:hover:not(.disabled) {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.1);
}

.time-slot.selected {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.time-slot.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 0.25rem solid rgba(0, 0, 0, 0.1);
    border-right-color: var(--primary-color);
    border-radius: 50%;
    animation: spinner 1s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Step Indicators */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step::before {
    content: "";
    position: absolute;
    top: 15px;
    left: -50%;
    width: 100%;
    height: 2px;
    background-color: #ddd;
    z-index: -1;
}

.step:first-child::before {
    display: none;
}

.step-circle {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ddd;
    border-radius: 50%;
    margin: 0 auto 0.5rem;
    font-weight: 600;
    color: #fff;
}

.step.active .step-circle {
    background-color: var(--primary-color);
}

.step.completed .step-circle {
    background-color: var(--success-color);
}

.step.active::before, .step.completed::before {
    background-color: var(--success-color);
}

.step-title {
    font-size: 0.875rem;
    font-weight: 600;
}

/* Login & Register Pages */
.auth-container {
    max-width: 400px;
    margin: 2rem auto;
}

.auth-card {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    height: 60px;
}

/* Notifications */
.notification-dropdown {
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-content p {
    margin-bottom: 0;
    font-size: 0.875rem;
}

/* Responsive utilities */
@media (max-width: 576px) {
    .container, .container-fluid, .container-sm {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .col, [class*="col-"] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Adjust table display on small screens */
    .table-responsive-sm {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Adjust button sizes on mobile */
    .btn {
        padding: 0.375rem 0.75rem;
    }
}

/* Dark Theme Styles */
body.dark-theme {
    --body-bg: #121212;
    --dark-color: #f8f9fa;
    background-color: #121212;
    color: #f8f9fa;
}

body.dark-theme .card,
body.dark-theme .calendar-container,
body.dark-theme .auth-card {
    background-color: #1e1e1e;
    color: #f8f9fa;
    border-color: #333;
}

body.dark-theme .card-header {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: #333;
}

body.dark-theme .table th {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .dropdown-menu {
    background-color: #1e1e1e;
    border-color: #333;
}

body.dark-theme .dropdown-item {
    color: #f8f9fa;
}

body.dark-theme .dropdown-item:hover,
body.dark-theme .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.05);
    color: #f8f9fa;
}

body.dark-theme .dropdown-divider {
    border-color: #333;
}

body.dark-theme .time-slot,
body.dark-theme .booking-type-card {
    background-color: #1e1e1e;
    color: #f8f9fa;
    border-color: #333;
}

body.dark-theme .time-slot:hover:not(.disabled),
body.dark-theme .booking-type-card:hover {
    background-color: rgba(255, 255, 255, 0.05);
}