/* Smart Date Picker */
.smart-date-picker {
    position: relative;
    width: 100%;
}

.smart-date-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 48px;
    width: 100%;
    box-sizing: border-box;
}

.smart-date-display:hover,
.smart-date-picker.open .smart-date-display {
    border-color: #AB0202;
    box-shadow: 0 0 0 2px rgba(171, 2, 2, 0.1);
}

.smart-date-icon {
    color: #AB0202;
    font-size: 18px;
    flex-shrink: 0;
}

.smart-date-text {
    flex: 1;
    color: #999;
    font-size: 15px;
    text-align: left;
}

.smart-date-text.has-value {
    color: #333;
    font-weight: 500;
}

.smart-date-chevron {
    color: #aaa;
    font-size: 12px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.smart-date-picker.open .smart-date-chevron {
    transform: rotate(180deg);
}

.smart-date-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 9998;
}

.smart-date-picker.open .smart-date-backdrop {
    display: block;
}

.smart-date-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    padding: 16px;
    box-sizing: border-box;
    min-width: 100%;
}

.smart-date-picker.open .smart-date-panel {
    display: block;
}

.smart-date-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.smart-date-panel-title {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.smart-date-close {
    background: #f5f5f5;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 4px 10px;
    border-radius: 6px;
}

.smart-date-selects {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: flex-end;
    width: 100%;
}

.smart-date-field {
    flex: 1 1 0;
    min-width: 0;
}

.smart-date-field label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #888;
    margin-bottom: 5px;
    font-weight: 600;
}

.smart-date-picker .smart-date-select,
.smart-date-picker .smart-date-year-input {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: 44px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: #333;
    box-sizing: border-box;
    -webkit-appearance: menulist;
    appearance: menulist;
}

.smart-date-picker .smart-date-year-input {
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
}

.smart-date-picker .smart-date-select:focus,
.smart-date-picker .smart-date-year-input:focus {
    outline: none;
    border-color: #AB0202;
    box-shadow: 0 0 0 2px rgba(171, 2, 2, 0.12);
}

.smart-date-hint {
    margin: 10px 0 12px;
    font-size: 12px;
    color: #999;
    text-align: center;
}

.smart-date-apply {
    width: 100%;
    background: #AB0202;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
}

.smart-date-apply:hover {
    background: #8a0101;
    color: #fff;
}

body.smart-date-open {
    overflow: hidden;
}

@media (max-width: 576px) {
    .smart-date-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 16px 16px 0 0;
        padding: 20px 16px 24px;
        min-width: 0;
    }

    .smart-date-selects {
        gap: 6px;
    }

    .smart-date-picker .smart-date-select,
    .smart-date-picker .smart-date-year-input {
        height: 48px;
        font-size: 15px;
        padding: 8px 6px;
    }
}
