/* Vue2 双月日期选择器样式 */
.dual-date-picker-wrapper {
    position: relative;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 触发器样式 */
.date-picker-trigger {
    cursor: pointer;
}

.default-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background: #fff;
    min-width: 200px;
    transition: border-color 0.3s;
}

.default-trigger:hover {
    border-color: #c0c4cc;
}

.trigger-icon {
    margin-left: 8px;
    color: #c0c4cc;
}

/* 弹出面板 */
.dual-date-picker-panel {
    position: absolute;
    top: 100%;
    left: -10px;
    z-index: 2000;
    width: 640px;
    background: #fff;
    border: 1px solid #e4e7ed;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    user-select: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dual-date-picker-panel.panel-visible {
    opacity: 1;
    transform: translateY(0);
}



/* 日历容器 */
.calendar-container {
    display: flex;
    padding: 20px 20px 0 20px;
}

.calendar-month {
    flex: 1;
    margin: 0 10px;
}

.calendar-month:first-child {
    margin-left: 0;
}

.calendar-month:last-child {
    margin-right: 0;
}

/* 月份头部 */
.month-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    height: 40px;
    position: relative;
}

.month-title {
    font-size: 16px;
    font-weight: 600;
    color: #303133;
    flex: 1;
    text-align: center;
}

.nav-btn {
    background: none;
    border: none;
    font-size: 14px;
    color: #606266;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s;
    /* position: absolute; */
}

.nav-btn:hover {
    background: #f5f7fa;
    color: #409eff;
}

.calendar-month:first-child .nav-btn:first-child {
    left: 0;
}

.calendar-month:first-child .nav-btn:nth-child(2) {
    left: 40px;
}

.calendar-month:last-child .nav-btn:first-child {
    right: 40px;
}

.calendar-month:last-child .nav-btn:last-child {
    right: 0;
}

/* 星期头部 */
.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 8px;
}

.weekday-header {
    text-align: center;
    font-size: 12px;
    color: #909399;
    font-weight: 500;
    padding: 8px 0;
}

/* 日期网格 */
.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.day-cell {
    width: 36px;
    height: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    color: #606266;
    margin: 1px;
    position: relative;
}

.day-number {
    font-size: 14px;
    line-height: 1;
}

.day-label {
    font-size: 10px;
    line-height: 1;
    margin-top: 2px;
    font-weight: 500;
    color: inherit;
}

.day-cell:hover {
    background: #ffdfdf;
    color: #606266;
}

.day-cell.other-month {
    color: #c0c4cc;
    cursor: default;
}

.day-cell.other-month:hover {
    background: none !important;
    color: #c0c4cc !important;
}

.day-cell.today {
    color: #409eff;
    font-weight: 600;
}

.day-cell.disabled {
    color: #c0c4cc;
    cursor: not-allowed;
    background: none !important;
}

.day-cell.selected {
    color: #fff;
    font-weight: 600;
}

.day-cell.selected .day-label {
    color: #fff;
    font-weight: 600;
}

.day-cell.depart-date {
    background: #e00000;  /* - 出发日期 */
}

.day-cell.return-date {
    background: #e00000;  /* - 返回日期 */
}

.day-cell.in-range {
    background: #fbf3f3;  /* 日期范围 */
    color: #606266;
}

.day-cell.hover-range {
    background: #fbf3f3;  /* - hover范围 */
    color: #606266 !important;
}

/* 天数信息显示 */
.days-info {
    padding: 0 20px;
    background: #fff;
    border-top: 1px solid #e4e7ed;
    text-align: center;
    font-size: 14px;
    color: #303133;
    font-weight: 500;
}



/* 底部按钮 */
.calendar-footer {
    padding: 16px 20px 20px 20px;
    border-top: 1px solid #e4e7ed;
    text-align: right;
    background: #fff;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.cancel-btn {
    display: none;
    background: #fff;
    color: #606266;
    border: 1px solid #dcdfe6;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.cancel-btn:hover {
    background: #f5f7fa;
    border-color: #c0c4cc;
}

.confirm-btn {
    background: #e00000;  /* 橙红色确认按钮 */
    color: #fff;
    border: none;
    padding: 0 24px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.confirm-btn:hover {
    opacity: 0.8;
}

.confirm-btn:active {
    opacity: 0.8;
}

/* 自定义Tooltip样式 */
.custom-tooltip {
    position: absolute;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: tooltipFadeIn 0.15s ease-out;
}

.custom-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(0, 0, 0, 0.85);
}

/* Tooltip动画 */
@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 编辑状态样式 */
.day-cell.editing {
    position: relative;
    animation: editingPulse 2s infinite;
}

.day-cell.editing::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px dashed #e00000;
    border-radius: 4px;
    pointer-events: none;
}

/* 编辑状态脉冲动画 */
@keyframes editingPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(224, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(224, 0, 0, 0.1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .dual-date-picker {
        width: 100%;
        max-width: 640px;
    }

    .calendar-container {
        flex-direction: column;
        padding: 16px;
    }

    .calendar-month {
        margin: 0 0 20px 0;
    }

    .calendar-month:last-child {
        margin-bottom: 0;
    }

    .date-picker-header {
        flex-direction: column;
        gap: 16px;
    }
}

/* 动画效果 */
.dual-date-picker {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
