/**
 * Tibet Daily Booking Form
 * 用 CSS 变量便于在 Kadence「附加 CSS」中覆盖
 */
.tibetdaily-booking-form-wrap {
    --td-form-primary:        #93312D;
    --td-form-primary-dark:   #74241F;
    --td-form-accent:         #E8C547;
    --td-form-text:           #1a1a1a;
    --td-form-muted:          #6b6b6b;
    --td-form-border:         #E5E1DA;
    --td-form-border-focus:   #93312D;
    --td-form-bg:             #ffffff;
    --td-form-bg-soft:        #FAF7F2;
    --td-form-radius:         6px;
    --td-form-gap:            16px;
    --td-form-font:           inherit;
    /* 按钮文字色：默认米色，hover 变纯白 */
    --td-form-btn-text:       #F5EBD8;
    --td-form-btn-text-hover: #FFFFFF;

    background: var(--td-form-bg);
    border: 1px solid var(--td-form-border);
    border-radius: calc(var(--td-form-radius) * 1.5);
    padding: 24px;
    font-family: var(--td-form-font);
    color: var(--td-form-text);
}

.td-form-title {
    display: block !important;
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--td-form-border);
    font-size: 1.35rem;
    line-height: 1.25;
    font-weight: 700;
    color: var(--td-form-primary);
}

.td-form-subtitle {
    margin: 0 0 16px;
    color: var(--td-form-muted);
    font-size: 0.95rem;
}

.tibetdaily-booking-form .td-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--td-form-gap);
}

.tibetdaily-booking-form .td-field-full   { grid-column: 1 / -1; }
.tibetdaily-booking-form .td-field-half   { grid-column: span 1; }

@media (max-width: 600px) {
    .tibetdaily-booking-form .td-form-grid { grid-template-columns: 1fr; }
    .tibetdaily-booking-form .td-field-half { grid-column: 1 / -1; }
}

.tibetdaily-booking-form .td-field-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--td-form-text);
}

.tibetdaily-booking-form .td-required { color: var(--td-form-primary); }
.tibetdaily-booking-form .td-label-note {
    font-weight: 400;
    color: var(--td-form-muted);
    font-size: 0.8rem;
}

.tibetdaily-booking-form input[type="text"],
.tibetdaily-booking-form input[type="email"],
.tibetdaily-booking-form input[type="tel"],
.tibetdaily-booking-form input[type="number"],
.tibetdaily-booking-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--td-form-border);
    border-radius: var(--td-form-radius);
    background: var(--td-form-bg);
    font: inherit;
    color: var(--td-form-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.tibetdaily-booking-form input:focus,
.tibetdaily-booking-form textarea:focus {
    outline: none;
    border-color: var(--td-form-border-focus);
    box-shadow: 0 0 0 3px rgba(139, 30, 45, 0.12);
}

.tibetdaily-booking-form .td-date-input,
.tibetdaily-booking-form .td-date-input + .flatpickr-input {
    min-height: 44px;
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--td-form-primary) 50%),
                      linear-gradient(135deg, var(--td-form-primary) 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.tibetdaily-booking-form textarea {
    resize: vertical;
    min-height: 100px;
}

.tibetdaily-booking-form .td-arrival-display {
    padding: 10px 12px;
    background: var(--td-form-bg-soft);
    border: 1px dashed var(--td-form-border);
    border-radius: var(--td-form-radius);
    color: var(--td-form-muted);
    font-style: italic;
}
.tibetdaily-booking-form .td-arrival-display.has-date {
    background: rgba(232, 197, 71, 0.12);
    border-style: solid;
    border-color: var(--td-form-accent);
    color: var(--td-form-text);
    font-style: normal;
    font-weight: 600;
}

.tibetdaily-booking-form .td-form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
    background: var(--td-form-primary);
    color: var(--td-form-btn-text);
    border: none;
    border-radius: var(--td-form-radius);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.05s ease;
}

.tibetdaily-booking-form .td-form-submit:hover:not(:disabled),
.tibetdaily-booking-form .td-form-submit:focus-visible:not(:disabled) {
    background: var(--td-form-primary-dark);
    color: var(--td-form-btn-text-hover);
}
.tibetdaily-booking-form .td-form-submit:active:not(:disabled) {
    transform: translateY(1px);
}
.tibetdaily-booking-form .td-form-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.tibetdaily-booking-form .td-form-hint {
    margin: 8px 0 0;
    font-size: 0.8rem;
    color: var(--td-form-muted);
    text-align: center;
}

.tibetdaily-booking-form .td-form-feedback {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--td-form-radius);
    font-size: 0.92rem;
}
.tibetdaily-booking-form .td-feedback-error {
    background: #FDECEA;
    border: 1px solid #F5C2BD;
    color: #B12C20;
}
.tibetdaily-booking-form .td-feedback-success {
    background: #E8F5E9;
    border: 1px solid #B8DCBA;
    color: #1F7A26;
}

/* Minimal single-date picker theme */
.flatpickr-calendar {
    border: 1px solid #e7e0d8;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(26, 26, 26, 0.16);
    font-family: inherit;
    width: 308px;
    max-width: calc(100vw - 32px);
    overflow: visible;
    z-index: 999999;
}
.flatpickr-months {
    padding: 10px 12px 0;
}
.flatpickr-current-month {
    font-size: 1rem;
    font-weight: 700;
}
.flatpickr-weekdays {
    padding: 8px 12px 0;
}
span.flatpickr-weekday {
    color: var(--td-form-muted);
    font-weight: 600;
}
.flatpickr-days {
    width: 308px;
    max-width: calc(100vw - 32px);
    padding: 4px 8px 12px;
}
.dayContainer {
    width: 292px;
    min-width: 292px;
    max-width: 292px;
}
.flatpickr-day {
    max-width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 12px;
    color: var(--td-form-text);
}
.flatpickr-day.today {
    border-color: var(--td-form-accent);
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
    background: var(--td-form-primary);
    border-color: var(--td-form-primary);
    color: #fff;
}
.flatpickr-day:hover {
    background: var(--td-form-bg-soft);
    border-color: var(--td-form-bg-soft);
}
.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
    color: #c7c0b8;
}
