/**
 * Barber Shop Management System - Custom Styles
 */

/* Sidebar Active State */
.sidebar-active {
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-left: 3px solid #fff;
}

.sidebar-link:hover {
    transform: translateX(4px);
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Stat Cards */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px -8px rgba(59, 130, 246, 0.3);
}

/* POS Service Cards */
.service-card {
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    width: 100%;
    background: #fff;
}

.service-card:hover {
    background-color: #f8fbff;
    transform: translateY(-0.5px);
    border-color: #3b82f6;
}

.service-card:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .service-card {
        padding: 0.75rem 0.75rem;
        border-radius: 1rem;
        gap: 0.75rem;
        flex-direction: row;
        align-items: center;
    }

    .service-card .w-14 {
        width: 2.25rem;
        height: 2.25rem;
    }

    .service-card h4 {
        font-size: 0.95rem;
        line-height: 1.2;
        white-space: normal;
    }

    .service-card p {
        font-size: 0.75rem;
    }
}

.service-card h4 {
    white-space: normal;
}

/* Category Tabs */
.category-tab {
    transition: all 0.2s ease;
    flex: 0 0 auto;
    min-width: 7rem;
}

.category-tab.active {
    background-color: #2563eb;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.category-tab:not(.active):hover {
    background-color: #eff6ff;
}

@media (max-width: 640px) {
    .category-tab {
        min-width: 6rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Bill Items */
.bill-item {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* DataTables Customization */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.375rem 0.75rem;
    outline: none;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
}

table.dataTable thead th {
    background-color: #eff6ff;
    color: #1e40af;
    font-weight: 600;
}

table.dataTable tbody tr:hover {
    background-color: #f0f9ff !important;
}

/* Login Page */
.login-bg {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
}

.login-card {
    backdrop-filter: blur(10px);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #93c5fd;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
}

/* Print Styles for Receipt */
@media print {
    body * {
        visibility: hidden;
    }

    #receiptPrint, #receiptPrint *,
    #reportPrint, #reportPrint * {
        visibility: visible;
    }

    #receiptPrint,
    #reportPrint {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    #reportPrint .report-tab,
    #reportPrint #reportFilters,
    #reportPrint #printReportBtn,
    #reportPrint button,
    #reportPrint input,
    #reportPrint select {
        display: none !important;
    }

    #reportPrint table {
        width: 100% !important;
        border-collapse: collapse;
    }

    #reportPrint th,
    #reportPrint td {
        border: 1px solid #d1d5db;
        padding: 0.75rem;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Overlay */
.modal-overlay {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

/* Form Focus */
.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Staff Photo Preview */
.photo-preview {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #dbeafe;
}
