﻿.custom-date-picker {
    position: relative;
    display: inline-block;
    width: 100%;
}

.date-input-container {
    position: relative;
    cursor: pointer;
}

    .date-input-container.disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.date-input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .date-input.outlined {
        border: 2px solid #d0d7de;
        padding: 16px 40px 8px 12px;
    }

    .date-input:hover:not(:disabled) {
        border-color: #0969da;
    }

    .date-input:focus {
        outline: none;
        border-color: #0969da;
        box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.1);
    }

.input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #656d76;
    pointer-events: none;
}

.input-label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 0 4px;
    color: #656d76;
    font-size: 14px;
    transition: all 0.2s ease;
    pointer-events: none;
}

.date-input.outlined + .input-icon ~ .input-label {
    top: 0;
    font-size: 12px;
    color: #0969da;
}

.input-label.focused {
    top: 0;
    transform: translateY(-50%);
    font-size: 12px;
    color: #0969da;
}

.calendar-popup {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 320px;
    background: white;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 16px;
}

.calendar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: transparent;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.nav-button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    color: #656d76;
    transition: all 0.2s ease;
}

    .nav-button:hover {
        background: #f6f8fa;
        color: #0969da;
    }

.month-year {
    font-weight: 600;
    color: #24292f;
}

.calendar-grid {
    margin-bottom: 16px;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 8px;
}

.weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #656d76;
    padding: 8px 4px;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    position: relative;
}

    .day-cell.other-month {
        color: #8c959f;
    }

    .day-cell.disabled {
        color: #8c959f;
        cursor: not-allowed;
        background: #f6f8fa;
    }

    .day-cell.reserved {
        background: #fff5f5;
        color: #cf222e;
        cursor: not-allowed;
    }

    .day-cell.today {
        background: #dbeafe;
        color: #0969da;
        font-weight: 600;
    }

    .day-cell.selected {
        background: #0969da;
        color: white;
        font-weight: 600;
    }

    .day-cell:not(.disabled):not(.reserved):hover {
        background: #f6f8fa;
        color: #0969da;
    }

.day-number {
    font-size: 14px;
}

.calendar-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid #d0d7de;
    padding-top: 16px;
}

.action-button {
    padding: 8px 16px;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

    .action-button.primary {
        background: #0969da;
        color: white;
        border-color: #0969da;
    }

    .action-button:hover {
        background: #f6f8fa;
        border-color: #0969da;
    }

    .action-button.primary:hover {
        background: #0860ca;
    }

/* Responsive design */
@media (max-width: 768px) {
    .calendar-popup {
        width: 280px;
        left: 50%;
        transform: translateX(-50%);
    }
