/* Main CSS Stylesheet for Babysitting Website */

:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFD93D;
    --dark-color: #2C3E50;
    --light-color: #F8F9FA;
    --text-color: #333333;
    --border-color: #DEE2E6;
    --success-color: #28A745;
    --warning-color: #FFC107;
    --danger-color: #DC3545;
    --info-color: #17A2B8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.logo img {
    height: 80px;
    margin-right: 10px;
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
    font-weight: 500;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #FF5252;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #45B7B8;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.btn-block {
    width: 100%;
    display: block;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Cards */
.card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-header {
    padding: 1rem 1.5rem;
    background-color: var(--light-color);
    border-bottom: 1px solid var(--border-color);
    border-radius: 10px 10px 0 0;
    margin: -1.5rem -1.5rem 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.card-body {
    padding: 0;
}

.card-footer {
    padding: 1rem 1.5rem;
    background-color: var(--light-color);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 10px 10px;
    margin: 1.5rem -1.5rem -1.5rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Babysitter Card */
.babysitter-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    transition: transform 0.3s;
}

.babysitter-card:hover {
    transform: translateX(10px);
}

.babysitter-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1.5rem;
}

.babysitter-info h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.babysitter-details {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
}

.babysitter-details span {
    display: inline-flex;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.star {
    color: var(--accent-color);
    font-size: 1rem;
}

.star.empty {
    color: var(--border-color);
}

.price {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: bold;
}

/* Calendar */
.calendar {
    background-color: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.calendar-day:hover {
    background-color: var(--light-color);
}

.calendar-day.available {
    background-color: #E8F5E9;
    color: var(--success-color);
    border-color: var(--success-color);
}

.calendar-day.selected {
    background-color: var(--primary-color);
    color: white;
}

.calendar-day.disabled {
    background-color: #F5F5F5;
    color: #999;
    cursor: not-allowed;
}

/* Time Slots */
.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 1rem;
}

.time-slot {
    padding: 10px;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.time-slot:hover {
    border-color: var(--primary-color);
    background-color: rgba(255, 107, 107, 0.1);
}

.time-slot.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.time-slot.unavailable {
    background-color: #F5F5F5;
    color: #999;
    cursor: not-allowed;
    border-color: #DDD;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    position: relative;
}

.alert-success {
    background-color: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.alert-danger {
    background-color: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

.alert-warning {
    background-color: #FFF3CD;
    color: #856404;
    border: 1px solid #FFEEBA;
}

.alert-info {
    background-color: #D1ECF1;
    color: #0C5460;
    border: 1px solid #BEE5EB;
}

.alert-dismissible {
    padding-right: 3rem;
}

.alert-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
}

.alert-close:hover {
    opacity: 1;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: var(--light-color);
    font-weight: 600;
    color: var(--dark-color);
}

.table tbody tr:hover {
    background-color: rgba(0,0,0,0.02);
}

.table-striped tbody tr:nth-child(even) {
    background-color: rgba(0,0,0,0.02);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-danger {
    background-color: var(--danger-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.badge-info {
    background-color: var(--info-color);
    color: white;
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 2000;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    background-color: white;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #CCC;
    text-decoration: none;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    color: #999;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul li {
        margin: 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .babysitter-card {
        flex-direction: column;
        text-align: center;
    }
    
    .babysitter-image {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .calendar-grid {
        font-size: 0.9rem;
    }
    
    .time-slots {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.d-flex { display: flex; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-100 { width: 100%; }
.rounded { border-radius: 5px; }
.shadow { box-shadow: 0 2px 10px rgba(0,0,0,0.1); }

/* Enhanced Navigation Styles */
nav ul li {
    position: relative;
}

nav ul li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
}

nav ul li a i {
    font-size: 1rem;
}

nav ul li a:hover {
    background-color: rgba(255, 107, 107, 0.1);
}

nav ul li a.active {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
    padding-bottom: 0.5rem;
}

/* Navigation Badges */
nav .badge {
    background: var(--warning-color);
    color: white;
    border-radius: 10px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    margin-left: 0.25rem;
    display: inline-block;
    line-height: 1;
}

nav .badge.badge-warning {
    background: #ff9800;
    color: white;
}

nav .badge.badge-danger {
    background: var(--danger-color);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    position: relative;
}

.dropdown-toggle::after {
    content: ' ▼';
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: none;
    min-width: 200px;
    margin-top: 0.5rem;
    z-index: 1001;
    padding: 0.5rem 0;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0 !important;
}

.dropdown-menu li a {
    color: var(--text-color) !important;
    padding: 0.75rem 1rem !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0 !important;
    background: transparent !important;
}

.dropdown-menu li a:hover {
    background: var(--light-color) !important;
}

.dropdown-menu li.divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* Button in navigation */
nav .btn {
    padding: 0.5rem 1rem;
}

nav .btn-primary {
    background: var(--primary-color);
    color: white;
}

nav .btn-primary:hover {
    background: #FF5252;
    color: white;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    color: white;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-primary {
    background-color: var(--primary-color);
}

.badge-secondary {
    background-color: var(--secondary-color);
}

.badge-success {
    background-color: var(--success-color);
}

.badge-danger {
    background-color: var(--danger-color);
}

.badge-warning {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.badge-info {
    background-color: var(--info-color);
}

/* Responsive Navigation Improvements */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 1rem;
    }
    
    nav ul li {
        margin: 0.25rem !important;
    }
    
    nav ul li a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .dropdown-menu {
        position: fixed;
        top: auto;
        right: 1rem;
        left: 1rem;
        width: auto;
    }
    
    nav .badge {
        padding: 0.15rem 0.3rem;
        font-size: 0.7rem;
    }
}
/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1003;
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
}

.mobile-menu-overlay.show {
    display: block;
}

/* Enhanced Mobile Navigation */
@media (max-width: 968px) {
    /* Compact header - override previous styles */
    .header-content {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.5rem 0 !important;
        gap: 0 !important;
    }
    
    .logo {
        font-size: 1.15rem;
    }
    
    .logo img {
        height: 80px;
    }
    
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
        order: 3;
    }
    
    /* Hide navigation by default on mobile - slide-in menu */
    nav {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
        z-index: 1002;
        overflow-y: auto;
        padding-top: 60px;
    }
    
    nav.mobile-menu-open {
        left: 0 !important;
    }
    
    nav ul {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 1rem !important;
        margin: 0 !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
    }
    
    nav ul li {
        margin: 0.25rem 0 !important;
        width: 100%;
    }
    
    nav ul li a {
        padding: 0.75rem 1rem !important;
        width: 100%;
        border-radius: 5px;
        font-size: 0.95rem !important;
    }
    
    /* Dropdown adjustments for mobile */
    .dropdown-menu {
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        border-left: 3px solid var(--primary-color) !important;
        margin-left: 1rem !important;
        margin-top: 0 !important;
        display: none;
        width: auto !important;
        right: auto !important;
        left: auto !important;
    }
    
    .dropdown.dropdown-open .dropdown-menu {
        display: block;
    }
    
    .dropdown-toggle::after {
        float: right;
    }
    
    /* Adjust nav badges for mobile */
    nav .badge {
        padding: 0.15rem 0.3rem;
        font-size: 0.7rem;
    }
    
    /* Make header stick but compact */
    header {
        padding: 0;
    }
}

/* Admin Panel Mobile Styles */
@media (max-width: 968px) {
    .admin-navbar-content {
        padding: 0.5rem 1rem;
    }
    
    .admin-logo {
        font-size: 1.1rem;
    }
    
    .admin-logo span {
        display: none;
    }
    
    .admin-navbar-right .btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .admin-navbar-right .btn span {
        display: none;
    }
    
    .admin-navbar-right .btn i {
        margin: 0;
    }
    
    .admin-user-toggle span {
        display: none;
    }
    
    .admin-user-menu {
        margin-left: 0.5rem;
    }
}

@media (max-width: 768px) {
    .admin-navbar {
        height: 50px;
    }
    
    .sidebar-toggle {
        padding: 0.4rem;
    }
}