/* Custom styles for reservation color picker */
.colorpicker-input {
    position: relative;
    padding-left: 15px !important;
    border-left: 5px solid #99ccff !important;
}

.colorpicker-input::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 1px solid #ccc;
    background-color: var(--color, #99ccff);
    border-radius: 3px;
    pointer-events: none;
}

/* Improved color input styling */
.color-input-container {
    position: relative !important;
    display: inline-block !important;
    width: 100% !important;
}

.color-preview {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    border: 2px solid white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    pointer-events: none !important;
    z-index: 10 !important;
}

/* Color input specific styles */
input[type="color"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-color: transparent !important;
    width: 100% !important;
    height: 45px !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    padding: 5px 50px 5px 10px !important;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0 !important;
}

input[type="color"]::-webkit-color-swatch {
    border: none !important;
    border-radius: 4px !important;
}

input[type="color"]::-moz-color-swatch {
    border: none !important;
    border-radius: 4px !important;
}

/* Ensure custom colored reservations have proper contrast */
.wrapper_each_reservation[style*="background-color"] {
    color: white !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}


/* Light colors should have dark text */
.wrapper_each_reservation.light-color {
    color: #333 !important;
}

.wrapper_each_reservation.light-color a {
    color: #333 !important;
}

/* Ensure current day (bg-warning) takes precedence over weekend (bg-weekend) */
th.bg-warning,
td.bg-warning {
    background-color: rgba(255, 193, 7, var(--bs-bg-opacity, 1)) !important;
}

/* Current day should override weekend styling */
th.bg-warning.bg-weekend,
td.bg-warning.bg-weekend {
    background-color: rgba(255, 193, 7, var(--bs-bg-opacity, 1)) !important;
}