.zoxe-booking-wrap {
    max-width: 720px;
    margin: 0 auto;
    font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', Arial, sans-serif;
}

#zoxe-booking-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 40px 44px;
}

/* Section title */
.zb-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #2c2d3e;
    border-left: 3px solid #2c2d3e;
    padding-left: 10px;
    margin: 28px 0 16px;
}

.zb-section-title:first-child { margin-top: 0; }

.zb-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 16px;
}

.zb-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 4px;
}

.zb-full { margin-bottom: 16px; }

.zb-field label {
    font-size: 0.83rem;
    font-weight: 600;
    color: #333;
}

.zb-field label span { color: #c0392b; }

.zb-field input[type="text"],
.zb-field input[type="email"],
.zb-field input[type="tel"],
.zb-field input[type="date"],
.zb-field select,
.zb-field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 0.92rem;
    color: #333;
    background: #fafafa;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.zb-field input:focus,
.zb-field select:focus,
.zb-field textarea:focus {
    outline: none;
    border-color: #2c2d3e;
    background: #fff;
}

/* Radio group */
.zoxe-booking-wrap .zb-radio-group {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
}

/* 只有兩個按鈕時（律師選擇）改成兩欄 */
.zoxe-booking-wrap .zb-radio-group:has(> .zb-radio:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.zoxe-booking-wrap .zb-radio {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 8px 16px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border: 1px solid #ddd !important;
    border-radius: 2px !important;
    cursor: pointer !important;
    font-size: 0.9rem !important;
    color: #333 !important;
    transition: all 0.15s !important;
    background: #fafafa !important;
    user-select: none !important;
    margin: 0 !important;
}

/* 手機版：全部按鈕單欄滿版，保證等寬 */
@media (max-width: 600px) {
    .zoxe-booking-wrap .zb-radio-group,
    .zoxe-booking-wrap .zb-radio-group:has(> .zb-radio:nth-child(2):last-child) {
        grid-template-columns: 1fr !important;
    }
}

.zb-radio:has(input:checked) {
    border-color: #2c2d3e;
    background: #2c2d3e;
    color: #fff;
}

.zb-radio input[type="radio"] { display: none; }

/* Time slots */
.zb-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 42px;
    align-items: flex-start;
    padding: 4px 0;
}

.zb-slots-hint {
    font-size: 0.8rem;
    color: #aaa;
    margin: 0;
    padding-top: 8px;
}

.zb-slot-btn {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 2px;
    background: #fafafa;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s;
    color: #333;
    font-family: inherit;
}

.zb-slot-btn:hover:not(:disabled) {
    border-color: #2c2d3e;
    color: #2c2d3e;
}

.zb-slot-btn.selected {
    background: #2c2d3e;
    border-color: #2c2d3e;
    color: #fff;
}

.zb-slot-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* ── Calendar ── */
.zb-calendar-wrap {
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    background: #fff;
    overflow: hidden;
    user-select: none;
}

.zb-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #2c2d3e;
    color: #fff;
}

.zb-cal-header span {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.zb-cal-header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
    opacity: 0.8;
    transition: opacity 0.15s;
    font-family: inherit;
}

.zb-cal-header button:hover { opacity: 1; }

.zb-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #e8e0d4;
    border-bottom: 1px solid #e5d4a8;
}

.zb-cal-weekdays span {
    text-align: center;
    padding: 8px 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #2c2d3e;
    letter-spacing: 0.05em;
}

.zb-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e0e0e0;
    padding: 1px;
}

.zb-cal-day {
    background: #fff;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    position: relative;
    min-height: 44px;
}

.zb-cal-empty { background: #fafafa; }

.zb-day-num {
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1;
    color: #333;
}

/* 狀態樣式 */
.zb-cal-past    { background: #f7f7f7; cursor: not-allowed; pointer-events: none; }
.zb-cal-past    .zb-day-num { color: #ccc; }

.zb-cal-closed  { background: #f2f2f2; cursor: not-allowed; pointer-events: none; }
.zb-cal-closed  .zb-day-num { color: #c0c0c0; }

.zb-cal-full    { background: #fceaea; cursor: not-allowed; pointer-events: none; }
.zb-cal-full    .zb-day-num { color: #e53535; }

.zb-cal-available {
    cursor: pointer;
    transition: background 0.15s;
}
.zb-cal-available:hover { background: #e8e0d4; }

.zb-cal-partial {
    cursor: pointer;
    transition: background 0.15s;
}
.zb-cal-partial:hover { background: #f7eedb; }

.zb-cal-today .zb-day-num {
    background: #2c2d3e;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
}

.zb-cal-selected {
    background: #e8e0d4 !important;
    outline: 2px solid #2c2d3e;
    outline-offset: -2px;
    z-index: 1;
}

/* 狀態小點 */
.zb-dot {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.zb-dot-available { background: #2ecc71; }
.zb-dot-partial   { background: #f39c12; }
.zb-dot-full      { background: #e53535; }

/* 圖例 */
.zb-cal-legend {
    display: flex;
    gap: 16px;
    padding: 10px 14px;
    border-top: 1px solid #e5d4a8;
    flex-wrap: wrap;
}

.zb-leg {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: #666;
}

.zb-leg::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.zb-leg-available::before { background: #2ecc71; }
.zb-leg-partial::before   { background: #f39c12; }
.zb-leg-full::before      { background: #e53535; }
.zb-leg-closed::before    { background: #ddd; }

/* 選取日期 label */
.zb-selected-date {
    font-size: 0.88rem;
    font-weight: 600;
    color: #2c2d3e;
    margin-bottom: 10px;
    padding: 6px 12px;
    background: #e8e0d4;
    border-left: 3px solid #2c2d3e;
    display: inline-block;
}

/* 已被預約的時段 */
.zb-slot-taken {
    opacity: 0.3;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* File upload */
.zb-upload-area {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 2px;
    padding: 20px;
    text-align: center;
    background: #fafafa;
    transition: border-color 0.2s;
    cursor: pointer;
}

.zb-upload-area:hover,
.zb-upload-area.dragover {
    border-color: #2c2d3e;
    background: #fdf5f5;
}

.zb-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.zb-upload-hint {
    font-size: 0.85rem;
    color: #888;
    margin: 0;
    pointer-events: none;
}

.zb-upload-hint small { font-size: 0.75rem; color: #aaa; }

.zb-file-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.zb-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
    border-radius: 2px;
    font-size: 0.82rem;
    color: #555;
}

.zb-file-remove {
    background: none;
    border: none;
    color: #c0392b;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 4px;
}

/* Message */
.zb-msg {
    padding: 12px 16px;
    border-radius: 2px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.zb-msg.success { background: #f0faf0; border: 1px solid #46b450; color: #2d7a30; }
.zb-msg.error   { background: #fdf0f0; border: 1px solid #c0392b; color: #c0392b; }

/* Submit */
.zb-submit {
    width: 100%;
    padding: 14px;
    background: #2c2d3e;
    color: #fff;
    border: none;
    border-radius: 2px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.zb-submit:hover   { background: #1a1b2a; }
.zb-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.zb-privacy-note {
    text-align: center;
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 12px;
    margin-bottom: 0;
}

@media (max-width: 600px) {
    #zoxe-booking-form { padding: 24px 20px; }
    .zb-row { grid-template-columns: 1fr; }
}
