/* Custom Barber Shop Styles */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Navigation Styles */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: white;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    border-bottom: none;
    font-weight: bold;
}

/* Button Styles */
.btn {
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(45deg, var(--success-color), #2ecc71);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(45deg, #2ecc71, var(--success-color));
    transform: translateY(-2px);
}

/* Form Styles */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
}

/* Time Slot Buttons */
.time-slot {
    border-radius: 20px;
    transition: all 0.3s ease;
}

.time-slot:hover {
    transform: translateY(-2px);
}

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

/* Footer Styles */
footer {
    margin-top: auto;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
}

/* Badge Styles */
.badge {
    border-radius: 15px;
    padding: 0.5em 0.8em;
}

/* Table Styles */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
}

/* Touch-Friendly Styles */
.touch-target {
    min-height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
}

/* Enhanced Button Styles for Touch */
.btn {
    min-height: 48px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 12px;
    margin: 8px 4px;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.btn:active {
    transform: scale(0.98);
}

.btn-lg {
    min-height: 56px;
    padding: 16px 32px;
    font-size: 18px;
}

/* Time Slot Buttons - Enhanced for Touch */
.time-slot {
    min-height: 56px;
    padding: 12px 16px;
    margin: 6px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    touch-action: manipulation;
    border: 2px solid #dee2e6;
}

.time-slot:hover, .time-slot:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.time-slot:active {
    transform: scale(0.98);
}

.time-slot.active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

/* Enhanced Form Controls */
.form-control, .form-select {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(44, 62, 80, 0.15);
}

/* Service and Barber Cards - Touch Friendly */
.service-card, .barber-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 20px;
    margin: 10px 0;
    min-height: 120px;
    touch-action: manipulation;
}

.service-card:hover, .barber-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.service-card:active, .barber-card:active {
    transform: scale(0.98);
}

.service-card.selected, .barber-card.selected {
    border-color: var(--primary-color);
    background-color: rgba(44, 62, 80, 0.05);
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.15);
}

/* Progress Steps - Enhanced for Touch */
.progress-step {
    min-height: 48px;
    min-width: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

/* Navigation - Touch Friendly */
.navbar-nav .nav-link {
    padding: 12px 16px;
    font-size: 16px;
    margin: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.navbar-toggler {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
}

/* Calendar and Date Picker Enhancements */
.calendar-day {
    min-height: 48px;
    min-width: 48px;
    border-radius: 12px;
    margin: 2px;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.calendar-day:active {
    transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .card {
        margin-bottom: 20px;
        border-radius: 16px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 12px;
        min-height: 52px;
    }
    
    .time-slot {
        width: 100%;
        margin: 8px 0;
    }
    
    .service-card, .barber-card {
        margin: 12px 0;
        padding: 24px;
    }
}

/* Tablet Specific Styles */
@media (min-width: 768px) and (max-width: 1024px) {
    .btn {
        min-height: 52px;
        padding: 14px 28px;
        font-size: 17px;
    }
    
    .time-slot {
        min-height: 60px;
        padding: 14px 18px;
        font-size: 17px;
    }
    
    .service-card, .barber-card {
        padding: 24px;
        margin: 12px 0;
    }
    
    .form-control, .form-select {
        min-height: 52px;
        padding: 14px 18px;
        font-size: 17px;
    }
}

/* Large Touch Devices */
@media (min-width: 1024px) and (pointer: coarse) {
    .btn {
        min-height: 56px;
        padding: 16px 32px;
        font-size: 18px;
    }
    
    .time-slot {
        min-height: 64px;
        padding: 16px 20px;
        font-size: 18px;
    }
}

/* Touch Device Specific Styles */
.touch-device .btn {
    min-height: 52px;
    font-size: 16px;
}

.touch-device .form-control,
.touch-device .form-select {
    min-height: 52px;
    font-size: 16px;
}

.touch-device .time-slot {
    min-height: 60px;
    font-size: 17px;
}

.touch-device .service-card,
.touch-device .barber-card {
    padding: 24px;
    min-height: 140px;
}

/* Disable text selection on interactive elements */
.service-card, .barber-card, .time-card, .date-card, .time-slot {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Focus styles for keyboard navigation */
.service-card:focus,
.barber-card:focus,
.time-card:focus,
.date-card:focus {
    outline: 3px solid #0d6efd;
    outline-offset: 2px;
}

/* Improved loading states */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading:after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Progress bar enhancements */
.progress {
    height: 8px;
    border-radius: 10px;
}

.progress-bar {
    border-radius: 10px;
}

/* Alert enhancements */
.alert {
    border-radius: 12px;
    padding: 16px 20px;
}

.alert .btn-close {
    padding: 12px;
}

/* Card shadow improvements */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Tablet landscape specific adjustments */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .container {
        max-width: 90%;
    }
    
    .service-card, .barber-card {
        margin: 8px 0;
    }
    
    .time-slot {
        margin: 4px;
        min-width: 120px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .btn {
        border-width: 1px;
    }
    
    .form-control {
        border-width: 1px;
    }
}
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Custom Border Colors */
.border-left-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 4px solid var(--success-color) !important;
}

.border-left-info {
    border-left: 4px solid #3498db !important;
}

.border-left-warning {
    border-left: 4px solid var(--warning-color) !important;
}

/* Language Switcher Styles */
.dropdown-item.active {
    background-color: var(--primary-color);
    color: white;
}

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

#languageDropdown {
    padding: 0.375rem 0.75rem;
}

#languageDropdown i {
    margin-right: 0.25rem;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.dropdown-item {
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    transition: background-color 0.2s ease;
}

.dropdown-item:focus,
.dropdown-item:active {
    outline: none;
    box-shadow: none;
}

/* Barber Photo Styles */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 2px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-circle:hover {
    transform: scale(1.05);
    border-color: #0d6efd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.barber-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    transition: transform 0.3s ease;
}

.barber-photo:hover {
    transform: scale(1.02);
}

.barber-photo-header {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    height: 200px;
}

.current-barber-photo {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.current-barber-photo:hover {
    border-color: #0d6efd;
}

/* Barber Card Styles */
.barber-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.barber-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.barber-card.selected {
    border-color: #0d6efd;
    background-color: #e7f3ff;
}

.barber-card .form-check-input:checked ~ .form-check-label {
    background-color: #e7f3ff;
    border-radius: 0.375rem;
    padding: 1rem;
}

.barber-card .form-check-input:checked ~ .form-check-label .avatar-circle {
    border-color: #0d6efd;
    background-color: #e7f3ff;
}

.touch-target {
    min-height: 44px;
    min-width: 44px;
}
