/* xvDate calendar styles aligned with site visual language */
:root {
    --xv-accent: var(--home-blue-600, #2563eb);
    --xv-accent-strong: #1d4ed8;
    --xv-surface: #ffffff;
    --xv-surface-soft: #f8fbff;
    --xv-border: #cbd5e1;
    --xv-border-strong: #b8c7db;
    --xv-text: #0f172a;
    --xv-text-soft: #64748b;
    --xv-shadow: 0 20px 44px rgba(15, 23, 42, 0.16);
    --xv-radius: 18px;
}

.dates_box .form-control,
.dates_box input[type="text"],
.dates_box input[type="email"],
.dates_box input[type="number"],
.dates_box input[type="password"],
.dates_box input[type="tel"],
.dates_box select {
    display: inline-block;
    height: auto;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.dates_box {
    position: absolute;
    width: 292px;
    max-width: calc(100vw - 24px);
    padding: 12px;
    border: 1px solid #dbe6f3;
    border-radius: var(--xv-radius);
    background: linear-gradient(180deg, var(--xv-surface) 0%, var(--xv-surface-soft) 100%);
    box-shadow: var(--xv-shadow);
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 13px;
    color: var(--xv-text);
    overflow: visible;
}

.choose_btn,
.dates_choose {
    float: left;
    position: relative;
}

.dates_box_top {
    height: auto;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dates_choose {
    width: calc(50% - 4px);
    border: 1px solid var(--xv-border);
    border-radius: 12px;
    background: #ffffff;
    overflow: visible;
}

.choose_btn {
    width: 30px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    /*background: #f8fafc;*/
    transition: background 0.2s ease, color 0.2s ease;
}

.choose_btn:hover {
    background: #eaf3ff;
}

.dates_choose .sign {
    display: inline-block;
    width: 0;
    height: 0;
    line-height: 0;
    border: 4px dashed transparent;
    vertical-align: middle;
    cursor: pointer;
}

.prev_choose {
    border-right: 1px solid var(--xv-border);
}

.next_choose {
    float: right;
    border-left: 1px solid var(--xv-border);
}

.choose_btn .sign {
    margin-top: 0;
}

.prev_choose .sign {
    border-left-width: 0;
    border-right-color: #475569;
}

.next_choose .sign {
    border-right-width: 0;
    border-left-color: #475569;
}

.ipt_wrap {
    float: left;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: calc(100% - 60px);
    height: 34px;
    line-height: 34px;
    background: #ffffff;
    overflow: hidden;
}

.ipt_wrap input {
    min-width: 26px;
    text-align: center;
    color: #0f172a;
    font-weight: 700;
    vertical-align: baseline;
}

.ipt_wrap .dlt_status {
    border: none !important;
    font-size: 13px !important;
}

.ipt_wrap .sign {
    margin-right: 2px;
    border-bottom-width: 0;
    border-top-color: #64748b;
}

.ipt_wrap small {
    margin-right: 4px;
    color: var(--xv-text-soft);
    font-size: 11px;
    line-height: 1;
}

.dates_mm {
    float: right;
}

.dates_table {
    width: 100%;
    margin: 10px auto 0;
    border: none;
    border-collapse: separate;
    border-spacing: 4px;
}

.dates_table thead tr th {
    height: 22px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.dates_table tr td {
    height: 34px;
    border-radius: 10px;
    color: #1e293b;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.dates_mm_list span:hover,
.dates_table tr td:hover,
.dates_yy_list span:hover {
    background: #eff6ff;
    cursor: pointer;
}

.other_day {
    color: #94a3b8;
}

.disable_day {
    color: #cbd5e1 !important;
    background: #f8fafc !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

.current_day,
.dates_mm_list span.current,
.dates_yy_list span.current {
    background: var(--xv-accent) !important;
    color: #ffffff !important;
}

.dates_bottom {
    height: auto;
    margin-top: 8px;
    padding: 0;
    overflow: visible;
}

.time_tag {
    padding: 0 4px;
    margin-right: 4px;
    color: var(--xv-text-soft);
    background: transparent;
}

.dates_hms {
    float: none;
    display: none;
    width: 100%;
    margin: 0 0 8px;
    padding: 6px 8px;
    border: 1px solid var(--xv-border);
    border-radius: 12px;
    background: #ffffff;
}

.dates_hms li {
    float: left;
    height: 24px;
    line-height: 24px;
    vertical-align: middle;
}

.dates_hms li input {
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    vertical-align: middle;
}

.dates_hms li input.dlt_status {
    width: 20px;
    border: none !important;
    font-size: 12px !important;
}

.dates_btn {
    float: none;
    width: 100%;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dates_btn a {
    float: none;
    flex: 1 1 0;
    min-width: 0;
    height: 34px;
    line-height: 34px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #f1f5f9;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.dates_btn a:hover {
    background: #e2e8f0;
}

.dates_btn .xv_Dates_today {
    background: #eff6ff;
    color: var(--xv-accent);
}

.dates_btn .xv_Dates_today:hover {
    background: #dbeafe;
}

.dates_btn .xv_Dates_ok {
    background: var(--xv-accent);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.24);
}

.dates_btn .xv_Dates_ok:hover {
    background: var(--xv-accent-strong);
    transform: translateY(-1px);
}

.dates_mm_list,
.dates_yy_list {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    width: 100%;
    height: 188px;
    padding: 4px 0;
    overflow-y: auto;
    border: 1px solid var(--xv-border-strong);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
    z-index: 20;
}

.dates_mm_list span,
.dates_yy_list span {
    display: block;
    width: 100%;
    padding: 0 8px;
    line-height: 30px;
    text-align: center;
    font-size: 12px;
}

.dates_mm_list::-webkit-scrollbar,
.dates_yy_list::-webkit-scrollbar {
    width: 6px;
}

.dates_mm_list::-webkit-scrollbar-thumb,
.dates_yy_list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.7);
}

@media (max-width: 768px) {
    .dates_box {
        position: fixed !important;
        left: 12px !important;
        right: 12px;
        top: auto !important;
        bottom: max(12px, env(safe-area-inset-bottom));
        width: auto !important;
        max-width: none;
        padding: 14px;
        border-radius: 20px;
        box-shadow: 0 26px 48px rgba(15, 23, 42, 0.22);
    }

    .dates_box_top {
        gap: 6px;
    }

    .dates_choose {
        width: calc(50% - 3px);
    }

    .choose_btn {
        width: 32px;
        height: 36px;
    }

    .ipt_wrap {
        width: calc(100% - 64px);
        height: 36px;
        line-height: 36px;
    }

    .dates_table {
        border-spacing: 3px;
    }

    .dates_table tr td {
        height: 38px;
        font-size: 14px;
        border-radius: 11px;
    }

    .dates_hms {
        margin-bottom: 10px;
    }

    .dates_btn {
        gap: 6px;
    }

    .dates_btn a {
        height: 38px;
        line-height: 38px;
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .dates_box {
        left: 8px !important;
        right: 8px;
        padding: 12px;
        border-radius: 18px;
    }

    .dates_table thead tr th {
        font-size: 10px;
    }

    .dates_table tr td {
        height: 36px;
        font-size: 13px;
    }

    .dates_btn a {
        font-size: 12px;
    }
}
