/* Salon Booking Pro Frontend Styles */

/* General Styles */
.salon-booking-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Salon Directory Styles */
.salon-directory {
    margin-bottom: 40px;
}

.salon-directory-filters {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.salon-rating .star:hover,
.salon-rating .star:hover ~ .star {
    color: #ffc107 !important;
}

.filter-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: end;
    margin-bottom: 20px;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #3C2327;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #9f3340;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.salon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.salon-card {
    background: white;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.salon-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.salon-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}

.salon-card-content {
    padding: 24px;
}

.salon-card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #3C2327;
}

.salon-card-address {
    color: #6b7280;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.salon-card-contact {
    margin-bottom: 20px;
}

.salon-card-phone {
    color: #9f3340;
    text-decoration: none;
    font-weight: 500;
}

.salon-card-distance {
    color: #059669;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 4px 8px;
    background: rgba(5, 150, 105, 0.1);
    border-radius: 4px;
    display: inline-block;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #9f3340;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background: #3C2327;
    transform: translateY(-1px);
    color: white;
}

.btn-primary {
    background: #9f3340;
}

.btn-success {
    background: #059669;
}

.btn-danger {
    background: #dc2626;
}

/* Calendar Styles */
.salon-calendar-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.calendar-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #9f3340;
}

.calendar-title {
    font-size: 28px;
    font-weight: 700;
    color: #3C2327;
    margin-bottom: 10px;
}

.calendar-subtitle {
    color: #3C2327;
    font-size: 16px;
}

/* FullCalendar Overrides */
.fc {
    font-family: inherit;
}

.fc-button-primary {
    background-color: #3C2327 !important;
    border-color: #3C2327 !important;
}

.fc-button-primary:hover {
    background-color: #9f3340 !important;
    border-color: #9f3340 !important;
}

.fc-button-primary:disabled {
    background-color: #9f3340 !important;
    border-color: #9f3340 !important;
}

.fc-event {
    background-color: #059669 !important;
    border-color: #059669 !important;
    border-radius: 6px !important;
    padding: 2px 8px !important;
}

.fc-event:hover {
    background-color: #047857 !important;
}

.fc-day-today {
    background-color: rgba(59, 130, 246, 0.1) !important;
}

/* Booking Form */
.booking-form {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 30px;
}

.booking-form h3 {
    font-size: 24px;
    font-weight: 700;
    color: #3C2327;
    margin-bottom: 24px;
    text-align: center;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #3C2327;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #9f3340;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group.full-width {
    flex: 1 1 100%;
}

/* Time Slots */
.time-slots {
    display: grid;
   grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); 
    gap: 12px;
    margin: 20px 0;
}

.time-slot {
    padding: 12px;
    background: #f3f4f6 ;
    border: 2px solid transparent;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.time-slot:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.time-slot.selected {
    background: #9f3340;
    color: white;
    border-color: #9f3340;
}

.time-slot.unavailable {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Owner Dashboard */
.owner-dashboard {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.dashboard-header {
    margin-bottom: 40px;
    text-align: center;
}

.dashboard-title {
    font-size: 32px;
    font-weight: 700;
    color: #3C2327;
    margin-bottom: 10px;
}

.dashboard-nav {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping when needed */
    justify-content: space-between; /* Spread tabs across bar on desktop */
    gap: 8px;
    margin-bottom: 30px;
    background: #f3f4f6;
    padding: 8px;
    border-radius: 12px;
}

.dashboard-nav::-webkit-scrollbar {
    height: 6px;
}

.dashboard-nav::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-nav::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.nav-tab {
    flex: 1 1 auto; /* Grow to fill space on desktop, shrink when needed */
    min-width: fit-content;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #3C2327;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

.nav-tab.active {
    background: white;
    color: #9f3340;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    color: #3C2327;
}

.tab-content {
    display: none !important;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-content.active {
    display: block !important;
    opacity: 1;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.stat-card.green {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}

.stat-card.orange {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.stat-card.blue {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

/* Bookings List */
.bookings-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.booking-item {
    padding: 20px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.booking-item:hover {
    background: #f8f9fa;
}

.booking-item:last-child {
    border-bottom: none;
}

.booking-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 12px;
}

.booking-time {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.booking-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.booking-status.confirmed {
    background: #dcfce7;
    color: #166534;
}

.booking-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.booking-status.completed {
    background: #dbeafe;
    color: #1e40af;
}

.booking-status.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.booking-customer {
    color: #6b7280;
    margin-bottom: 8px;
}

.booking-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 6px;
}

/* Working Hours Editor */
.working-hours-editor {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.hours-grid {
    display: grid;
    gap: 20px;
}

.day-hours {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.day-label {
    min-width: 100px;
    font-weight: 600;
    color: #374151;
}

.time-inputs {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
}

.time-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.day-toggle {
    width: 50px;
    height: 26px;
    background: #d1d5db;
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.day-toggle.active {
    background: #9f3340;
}

.day-toggle::after {
    content: '';
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.day-toggle.active::after {
    transform: translateX(24px);
}

/* Holidays Manager */
.holidays-manager {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.holiday-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.holidays-list {
    list-style: none;
    padding: 0;
}

.holiday-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
}

.holiday-date {
    font-weight: 600;
    color: #374151;
}

.holiday-title {
    color: #6b7280;
    margin-left: 16px;
}

.holiday-remove {
    color: #dc2626;
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.holiday-remove:hover {
    background: #fee2e2;
}

/* Messages and Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background: #dbeafe;
    color: #9f3340;
    border: 1px solid #93c5fd;
}

/* Loading States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #6b7280;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #9f3340;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 992px) {
    .nav-tab {
        padding: 12px 16px;
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .salon-booking-container {
        padding: 16px;
    }
    
    .salon-directory-filters {
        padding: 20px;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .salon-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .time-slots {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .dashboard-nav {
        padding: 4px;
        gap: 4px;
        justify-content: flex-start; /* Remove spread on mobile */
    }
    
    .nav-tab {
        padding: 14px 18px; /* Even bigger for mobile */
        font-size: 16px; /* Larger readable size */
        min-width: auto;
        flex: 0 0 auto; /* Don't grow on mobile, just wrap */
    }
    
    .working-hours-editor {
        padding: 16px; /* Add proper padding on all sides */
        margin-left: auto;
        margin-right: auto;
    }
    
    .hours-grid {
        max-width: 100%;
        padding: 0;
    }
    
    .day-hours {
        gap: 8px; /* Reduce gap for mobile */
        padding: 10px; /* Reduce padding to fit */
        margin: 0 0 10px 0; /* Space between rows */
        font-size: 13px; /* Make everything slightly smaller */
    }
    
    .day-label {
        min-width: 70px; /* Smaller label width */
        font-size: 13px;
    }
    
    .time-inputs {
        gap: 8px; /* Reduce gap */
    }
    
    .time-input {
        padding: 6px 8px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .salon-card-content {
        padding: 20px;
    }
    
    .booking-form {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .booking-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .booking-actions {
        flex-wrap: wrap;
    }
    
    .dashboard-nav {
        gap: 4px;
        padding: 4px;
        justify-content: flex-start; /* Remove spread on smaller screens */
    }
    
    .nav-tab {
        padding: 14px 18px; /* Even bigger for small mobile */
        font-size: 14px; /* Larger readable size */
        min-width: auto;
        flex: 0 0 auto; /* Don't grow on small screens */
    }
    
    .working-hours-editor {
        padding: 12px; /* Smaller padding for small screens */
    }
    
    .hours-grid {
        max-width: 100%;
        padding: 0;
    }
    
    .day-hours {
        gap: 6px; /* Even smaller gap */
        padding: 8px; /* Even smaller padding to fit better */
        margin: 0 0 8px 0;
        font-size: 12px; /* Smaller text */
    }
    
    .day-label {
        min-width: 60px; /* Even smaller on very small screens */
        font-size: 11px; /* Smaller text */
    }
    
    .time-inputs {
        gap: 4px; /* Smaller gap */
    }
    
    .time-input {
        padding: 5px 6px;
        font-size: 11px; /* Smaller font */
        max-width: 85px; /* Constrain width */
    }
}

@media (max-width: 400px) {
    .nav-tab {
        padding: 10px 12px; /* Bigger for very small screens */
        font-size: 12px; /* Readable size */
    }
}

/* Accessibility */
.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;
}

/* Focus styles */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {  
    outline: 2px solid #9f3340;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .salon-card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .time-slot {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}