/* Sanchu Vet on Wheels - Custom CSS */

/* Root Variables - Sanchu Logo Theme */
:root {
    --primary-color: #4a90e2;
    --primary-dark: #357abd;
    --accent-color: #e91e63;
    --accent-dark: #c2185b;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    --gradient-primary-soft: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, rgba(233, 30, 99, 0.1) 100%);
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --transition: all 0.2s ease-in-out;
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    box-shadow: var(--box-shadow-lg);
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0.75rem 1.5rem rgba(37, 211, 102, 0.4);
    color: white;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Button Enhancements */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent-dark) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #146c43 100%);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #ffca2c 100%);
    color: var(--dark-color);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #b02a37 100%);
}

/* Card Enhancements */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
}

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

.card-header {
    background: var(--light-color);
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Form Enhancements */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

.form-control-lg {
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
}

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

/* Form Check Cards for Services */
.form-check-card {
    margin-bottom: 0.75rem;
}

.form-check-card .form-check-input {
    margin-top: 0.25rem;
}

.form-check-card .form-check-label {
    cursor: pointer;
    padding: 1rem;
    border: 2px solid #dee2e6;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: block;
    margin-left: 0.5rem;
    background: #fff;
}

.form-check-card .form-check-label:hover {
    background-color: var(--light-color);
    border-color: var(--primary-color);
}

.form-check-card .form-check-input:checked + .form-check-label {
    background: var(--gradient-primary-soft);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Table Enhancements */
.table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table th {
    background-color: var(--light-color);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: var(--dark-color);
    padding: 1rem 0.75rem;
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
}

.table-hover tbody tr:hover {
    background-color: rgba(74, 144, 226, 0.05);
}

/* Badge Enhancements */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
    border-radius: var(--border-radius);
}

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

/* Status Badges */
.badge.status-pending {
    background: linear-gradient(135deg, var(--warning-color) 0%, #ffca2c 100%);
    color: var(--dark-color);
}

.badge.status-booked {
    background: linear-gradient(135deg, var(--success-color) 0%, #146c43 100%);
}

.badge.status-rescheduled {
    background: linear-gradient(135deg, var(--info-color) 0%, #0aa2c0 100%);
    color: var(--dark-color);
}

.badge.status-cancelled {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.badge.status-closed {
    background: var(--gradient-primary);
}

/* Modal Enhancements */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1.5rem;
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.1) 0%, rgba(20, 108, 67, 0.1) 100%);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 202, 44, 0.1) 100%);
    color: #856404;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.1) 0%, rgba(10, 162, 192, 0.1) 100%);
    color: #055160;
    border-left: 4px solid var(--info-color);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(176, 42, 55, 0.1) 100%);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

/* Loading States */
.btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

.btn.loading::after {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Map Container Styling */
.map-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

#mapContainer {
    border: 2px solid #dee2e6;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

#mapContainer.map-active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

/* Leaflet Map Customization */
.leaflet-container {
    font-family: inherit;
}

.leaflet-popup-content-wrapper {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
}

.leaflet-popup-content {
    margin: 1rem;
}

/* Navigation Enhancements */
.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    transform: translateY(-1px);
}

/* Footer Styling */
footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #343a40 100%);
}

/* Service Cards */
.service-card {
    transition: var(--transition);
    border: none;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Timeline Styling */
.timeline {
    position: relative;
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 2rem;
}

.timeline-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 1.25rem;
    top: 3rem;
    width: 2px;
    height: calc(100% - 1rem);
    background: linear-gradient(to bottom, var(--primary-color), rgba(74, 144, 226, 0.3));
}

.timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--box-shadow);
}

/* Dashboard Stats Cards */
.stat-card {
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Copy Button Animation */
.copy-success {
    animation: copySuccess 0.3s ease;
}

@keyframes copySuccess {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .table-responsive {
        border-radius: var(--border-radius);
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .form-check-card .form-check-label {
        padding: 0.75rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: var(--border-radius) !important;
        margin-bottom: 0.25rem;
    }
}

/* Print Styles */
@media print {
    .whatsapp-float,
    .btn,
    .navbar,
    .modal,
    .dropdown {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .table {
        border-collapse: collapse;
    }
    
    .table th,
    .table td {
        border: 1px solid #dee2e6;
        padding: 0.5rem;
    }
}

/* Accessibility Enhancements */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: none;
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .card {
        border: 1px solid var(--dark-color);
    }
    
    .form-control,
    .form-select {
        border: 2px solid var(--dark-color);
    }
}

/* 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;
    }
    
    .whatsapp-btn {
        animation: none;
    }
}

/* Comprehensive Dark Theme Support */
@media (prefers-color-scheme: dark) {
    /* Base elements */
    body {
        background-color: #121212 !important;
        color: #ffffff !important;
    }
    
    /* Bootstrap utility classes override */
    .bg-light,
    .bg-white {
        background-color: #1e1e1e !important;
    }
    
    .text-dark {
        color: #ffffff !important;
    }
    
    .text-muted {
        color: #cccccc !important;
    }
    
    .text-body {
        color: #ffffff !important;
    }
    
    /* Card components */
    .card,
    .card-header,
    .card-body,
    .card-footer {
        background-color: #1e1e1e !important;
        color: #ffffff !important;
        border-color: #333333 !important;
    }
    
    /* Modal components */
    .modal-content,
    .modal-header,
    .modal-body,
    .modal-footer {
        background-color: #1e1e1e !important;
        color: #ffffff !important;
        border-color: #333333 !important;
    }
    
    /* Form controls */
    .form-control,
    .form-select,
    .form-check-input {
        background-color: #2d2d2d !important;
        border-color: #444444 !important;
        color: #ffffff !important;
    }
    
    .form-control:focus,
    .form-select:focus {
        background-color: #2d2d2d !important;
        border-color: #0d6efd !important;
        color: #ffffff !important;
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
    }
    
    .form-control::placeholder {
        color: #888888 !important;
    }
    
    /* Labels and text */
    .form-label,
    .form-check-label,
    label,
    .fw-semibold,
    .fw-bold {
        color: #ffffff !important;
    }
    
    /* Input groups */
    .input-group-text {
        background-color: #333333 !important;
        color: #ffffff !important;
        border-color: #444444 !important;
    }
    
    /* Dropdown menus */
    .dropdown-menu {
        background-color: #1e1e1e !important;
        color: #ffffff !important;
        border-color: #333333 !important;
    }
    
    .dropdown-item {
        color: #ffffff !important;
    }
    
    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: #2d2d2d !important;
        color: #ffffff !important;
    }
    
    /* List groups */
    .list-group-item {
        background-color: #1e1e1e !important;
        color: #ffffff !important;
        border-color: #333333 !important;
    }
    
    /* Tables */
    .table {
        color: #ffffff !important;
        border-color: #333333 !important;
    }
    
    .table th {
        background-color: #333333 !important;
        color: #ffffff !important;
        border-color: #444444 !important;
    }
    
    .table td {
        border-color: #444444 !important;
    }
    
    .table-striped > tbody > tr:nth-of-type(odd) > td,
    .table-striped > tbody > tr:nth-of-type(odd) > th {
        background-color: #2a2a2a !important;
    }
    
    /* Toast notifications */
    .toast,
    .toast-header {
        background-color: #1e1e1e !important;
        color: #ffffff !important;
        border-color: #333333 !important;
    }
    
    /* Navigation tabs */
    .nav-tabs .nav-link {
        color: #ffffff !important;
        border-color: #333333 !important;
    }
    
    .nav-tabs .nav-link.active {
        background-color: #1e1e1e !important;
        color: #ffffff !important;
        border-color: #333333 !important;
    }
    
    /* Pagination */
    .pagination .page-link {
        background-color: #2d2d2d !important;
        color: #ffffff !important;
        border-color: #444444 !important;
    }
    
    .pagination .page-link:hover {
        background-color: #444444 !important;
        color: #ffffff !important;
    }
    
    /* Badges */
    .badge.bg-light {
        background-color: #2d2d2d !important;
        color: #ffffff !important;
    }
    
    /* Buttons */
    .btn-light {
        background-color: #2d2d2d !important;
        color: #ffffff !important;
        border-color: #444444 !important;
    }
    
    .btn-light:hover {
        background-color: #444444 !important;
        color: #ffffff !important;
        border-color: #666666 !important;
    }
    
    .btn-outline-primary {
        color: #6ea8fe !important;
        border-color: #6ea8fe !important;
    }
    
    .btn-outline-primary:hover {
        background-color: #6ea8fe !important;
        border-color: #6ea8fe !important;
        color: #000000 !important;
    }
    
    .btn-outline-secondary {
        color: #adb5bd !important;
        border-color: #6c757d !important;
    }
    
    .btn-outline-secondary:hover {
        background-color: #6c757d !important;
        border-color: #6c757d !important;
        color: #ffffff !important;
    }
    
    /* Accordion */
    .accordion-item {
        background-color: #1e1e1e !important;
        border-color: #333333 !important;
    }
    
    .accordion-button {
        background-color: #2d2d2d !important;
        color: #ffffff !important;
    }
    
    .accordion-button:not(.collapsed) {
        background-color: #333333 !important;
        color: #ffffff !important;
    }
    
    /* Offcanvas */
    .offcanvas {
        background-color: #1e1e1e !important;
        color: #ffffff !important;
    }
    
    /* Alert components */
    .alert {
        color: #ffffff !important;
    }
    
    .alert-info {
        background-color: #1e293b !important;
        border-color: #3b82f6 !important;
        color: #93c5fd !important;
    }
    
    .alert-success {
        background-color: #14532d !important;
        border-color: #16a34a !important;
        color: #86efac !important;
    }
    
    .alert-warning {
        background-color: #451a03 !important;
        border-color: #d97706 !important;
        color: #fcd34d !important;
    }
    
    .alert-danger {
        background-color: #7f1d1d !important;
        border-color: #dc2626 !important;
        color: #fca5a5 !important;
    }
    
    /* Leaflet map container */
    .leaflet-container {
        background-color: #1e1e1e !important;
    }
    
    /* Address suggestions */
    .address-suggestions {
        background-color: #2d2d2d !important;
        border-color: #444444 !important;
    }
    
    .suggestion-item {
        background-color: #2d2d2d !important;
        border-bottom-color: #444444 !important;
        color: #ffffff !important;
    }
    
    .suggestion-item:hover,
    .suggestion-item.active {
        background-color: #1e3a8a !important;
        color: #ffffff !important;
    }
    
    .suggestion-main {
        color: #ffffff !important;
    }
    
    .suggestion-details {
        color: #cccccc !important;
    }
    
    /* Form check cards for services */
    .form-check-card .form-check-label {
        background-color: #2d2d2d !important;
        border-color: #444444 !important;
        color: #ffffff !important;
    }
    
    .form-check-card .form-check-input:checked + .form-check-label {
        background-color: #1e3a8a !important;
        border-color: #3b82f6 !important;
        color: #ffffff !important;
    }
}

/* Custom Utilities */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.shadow-custom {
    box-shadow: var(--box-shadow-lg);
}

.rounded-custom {
    border-radius: var(--border-radius);
}

/* Accent Color Utilities */
.btn-accent {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    border: none;
    color: white;
}

.btn-accent:hover,
.btn-accent:focus {
    background: linear-gradient(135deg, var(--accent-dark) 0%, #ad1457 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(233, 30, 99, 0.4);
    color: white;
}

.text-accent {
    color: var(--accent-color) !important;
}

.bg-accent {
    background-color: var(--accent-color) !important;
}

.border-accent {
    border-color: var(--accent-color) !important;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* City-based service restrictions */
.form-check-card.is-disabled {
    opacity: 0.5;
    pointer-events: none;
    background-color: #f5f5f5;
}

.form-check-card.is-disabled .form-check-input {
    cursor: not-allowed;
}

.form-check-card.is-disabled .form-check-label {
    color: #999;
    cursor: not-allowed;
}

.salon-city-note {
    font-size: 0.75rem;
    color: #dc3545 !important;
    font-style: italic;
}
