/* Fixes for Sanay-e */

/* Appointment Date Input Fix */
#appointment-date {
    pointer-events: auto !important;
    position: relative;
    z-index: 50;
    min-height: 48px;
    /* Larger touch target */
    cursor: pointer;
    background-color: var(--background-color);
    /* Ensure opacity */
    opacity: 1 !important;
}

/* Ensure modal interaction */
#appointment-modal .modal-content {
    pointer-events: auto !important;
    position: relative;
    /* Context for children if needed */
}

/* Fallback for date type support */
input[type="date"] {
    position: relative;
}

/* Add calendar icon for better UX if supported */
input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
    z-index: 10;
}

/* --- Floating Glass Close Button Fix --- */

/* Reset Modal Header */
.modal-header {
    position: relative;
    /* Reset sticky */
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Ensure header text scrolls with content */
}

/* Floating Close Button */
.close-modal,
.close-settings-modal {
    position: fixed;
    /* Fixed to viewport */
    top: 20px;
    right: 20px;
    z-index: 9999;
    /* Top of everything */

    width: 44px;
    height: 44px;
    border-radius: 50%;

    /* Glass Effect */
    background: rgba(24, 24, 27, 0.6);
    /* Zinc-900 with transparency */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);

    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.close-modal:hover,
.close-settings-modal:hover {
    background: rgba(249, 115, 22, 0.2);
    /* Primary color tint */
    border-color: var(--primary-color);
    transform: scale(1.1) rotate(90deg);
    /* Nice interaction */
    color: #fff;
}

.close-modal:active,
.close-settings-modal:active {
    transform: scale(0.9);
}

/* Hide the placeholder in the header if it exists */
.modal-header .close-modal,
.modal-header .close-settings-modal {
    /* We don't hide it, because it IS the button. 
       The fixed position takes it out of flow. 
       Use a spacer if header collapses? 
       Header has flex space-between, so title might jump. 
       Let's check. */
}

/* Adjust header to not rely on button for spacing */
.modal-header h3 {
    margin-right: 50px;
    /* Space for the fixed button so text doesn't overlap initially */
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
    /* Slightly wider for better usability */
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(24, 24, 27, 0.5);
    /* Dark track */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    /* Subtle thumb */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
    /* Lighter on hover */
}

/* Shop Settings Overhaul */
.settings-section-title {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    margin-top: 10px;
}

.settings-section-title:first-child {
    margin-top: 0;
}

/* Toggle Card for Specialities */
.toggle-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.toggle-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.toggle-card input[type="checkbox"] {
    display: none;
}

.toggle-card.active {
    background: rgba(255, 77, 77, 0.15);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 77, 77, 0.2);
}

.toggle-card i {
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.toggle-card.active i {
    color: var(--primary-color);
}

/* Checkmark Icon */
.toggle-card::after {
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.8rem;
    color: var(--primary-color);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toggle-card.active::after {
    opacity: 1;
    transform: scale(1);
}

/* Brand Tags */
.brand-tag {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.brand-tag:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.brand-tag i {
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    font-size: 0.8rem;
    padding: 4px;
    margin-right: -4px;
}

.brand-tag i:hover {
    color: var(--danger-color);
    background: rgba(255, 0, 0, 0.1);
    border-radius: 50%;
}