/* DT Contact – front.css v1.3 */

.dtc-scope {
    font-family: system-ui, -apple-system, sans-serif;
    max-width: 980px;
    margin: 24px auto;
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    color: #1f2430;
}
.dtc-scope *, .dtc-scope *::before, .dtc-scope *::after { box-sizing: border-box; }

/* ── Notices ─────────────────────────────────────────────────────────────── */
.dtc-notice {
    padding: 14px 18px; border-radius: 10px;
    margin-bottom: 20px; font-weight: 500; font-size: 0.95rem;
}
.dtc-success { background:#ecfdf5; border:1px solid #6ee7b7; color:#065f46; }
.dtc-error   { background:#fef2f2; border:1px solid #fca5a5; color:#991b1b; }
.dtc-pending { background:#fffbeb; border:1px solid #fbbf24; color:#92400e; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.dtc-cal-wrap {
    display: flex; flex-wrap: nowrap; gap: 40px; align-items: flex-start;
}
.dtc-cal-left  { flex: 1.3; min-width: 0; }
.dtc-cal-right { flex: 1;   min-width: 0; }

/* ── Calendar header ─────────────────────────────────────────────────────── */
.dtc-cal-header {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 20px;
}
.dtc-month-label { font-weight: 800; font-size: 1.25rem; color: #1f2430; }
.dtc-nav {
    border: 1px solid #e5e7eb; background: #fff; border-radius: 8px;
    width: 36px; height: 36px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: #555; padding: 0; line-height: 1;
}
.dtc-nav:hover { background: #f3f4f6; }

/* ── Weekday labels ──────────────────────────────────────────────────────── */
.dtc-weekdays {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 8px; text-align: center; margin-bottom: 10px;
    font-size: 0.85rem; font-weight: 700; color: #6b7280;
}
.dtc-weekdays span { display: block; text-align: center; }

/* ── Day grid ────────────────────────────────────────────────────────────── */
.dtc-grid {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px;
}
.dtc-day {
    display: block; width: 100%;
    /* NO border by default — only available days get one */
    border: 1px solid transparent;
    background: transparent;
    border-radius: 8px;
    padding: 12px 0;
    font-size: 1rem; font-weight: 600;
    cursor: default; color: #1f2430;
    transition: all 0.2s; line-height: 1; text-align: center;
}

/* Out-of-month: invisible */
.dtc-day.is-out { color: #d1d5db; border-color: transparent; }

/* Past in-month: greyed, no border, but still clickable to show "no times" */
.dtc-day.is-past {
    color: #9ca3af; border-color: transparent;
    background: transparent; cursor: pointer; opacity: 0.5;
}

/* Unavailable in-month: same — no border, subtle, still clickable */
.dtc-day.is-unavailable {
    color: #9ca3af; border-color: transparent;
    background: transparent; cursor: pointer;
}

/* Available: gets the visible border box */
.dtc-day.is-available {
    border-color: #e5e7eb; background: #fff; cursor: pointer;
}
.dtc-day.is-available:hover {
    border-color: #a987c2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Selected (any day) */
.dtc-day.is-selected.is-available {
    background-color: rgba(169,135,194,0.2);
    border-color: #a987c2;
    color: #a987c2;
    outline: 2px solid #a987c2;
}
.dtc-day.is-selected.is-unavailable,
.dtc-day.is-selected.is-past {
    background: #f3f4f6;
    border-color: #d1d5db;
    outline: 1px solid #d1d5db;
}

.dtc-tz-label { font-size: 0.78rem; color: #9ca3af; margin-top: 12px; }

/* ── Right panel ─────────────────────────────────────────────────────────── */

/* Selected date heading */
.dtc-selected-date {
    font-weight: 700; font-size: 1rem; color: #1f2430;
    margin-bottom: 12px; display: none;
}

.dtc-prompt {
    text-align: center; color: #6b7280;
    padding: 40px 20px; background: #f9fafb;
    border-radius: 12px; font-size: 0.95rem; margin: 0 0 12px;
}

.dtc-times {
    display: flex; flex-direction: column; gap: 10px;
    max-height: 420px; overflow-y: auto;
    padding-right: 5px; margin-bottom: 16px;
}
.dtc-times::-webkit-scrollbar       { width: 10px; }
.dtc-times::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
.dtc-times::-webkit-scrollbar-thumb { background: #a987c2; border-radius: 10px; border: 2px solid #f1f1f1; }
.dtc-times::-webkit-scrollbar-thumb:hover { background: #8e6ba8; }

.dtc-time-opt {
    display: flex; align-items: center; gap: 12px;
    border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 14px 18px; cursor: pointer;
    transition: all 0.2s; background: #fff;
}
.dtc-time-opt:hover { border-color: #a987c2; box-shadow: 0 2px 8px rgba(169,135,194,0.15); }
.dtc-time-opt input[type="radio"] { margin:0; accent-color:#a987c2; transform:scale(1.2); flex-shrink:0; }
.dtc-time-opt span { font-weight: 600; font-size: 1rem; color: #1f2430; }

/* ── Booking form ────────────────────────────────────────────────────────── */
.dtc-book-form { border-top: 1px solid #e5e7eb; padding-top: 20px; margin-top: 4px; }
.dtc-fields { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.dtc-fields label {
    display: flex; flex-direction: column; gap: 5px;
    font-size: 0.95rem; font-weight: 700; color: #374151;
}
.dtc-fields input, .dtc-fields textarea, .dtc-scope .dtc-fields select {
    width: 100% !important; padding: 12px 16px !important;
    border: 1px solid #d1d5db !important; border-radius: 8px !important;
    font-size: 1rem; font-family: inherit; background: #fff;
    transition: border-color 0.15s;
    appearance: none !important; -webkit-appearance: none !important; -moz-appearance: none !important;
    height: auto !important; line-height: 1.4;
}
.dtc-scope .dtc-fields select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236b7280' d='M6 8L0 0h12z'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    padding-right: 38px !important;
}
.dtc-fields input:focus, .dtc-fields textarea:focus, .dtc-scope .dtc-fields select:focus {
    outline: none; border-color: #a987c2 !important;
    box-shadow: 0 0 0 2px rgba(169,135,194,0.2) !important;
}
/* Let visitors drag the textarea taller (bottom-right grip). The theme
   forces resize:none on textareas, which removed the grip — restore it.
   Higher-specificity selector + overflow:auto so a theme overflow:hidden
   (which can suppress the WebKit resizer) can't win. */
.dtc-scope .dtc-fields textarea,
.dtc-fields textarea {
    resize: vertical !important;
    overflow: auto !important;
    min-height: 96px;
}

/* ── Button ──────────────────────────────────────────────────────────────── */
.dtc-btn {
    width: 100%; padding: 16px;
    background: #a987c2; color: #fff; border: none;
    border-radius: 12px; font-size: 1.1rem; font-weight: 700;
    cursor: pointer; transition: background 0.2s; font-family: inherit;
}
.dtc-btn:hover:not(:disabled) { background: #946da3; }
.dtc-btn:disabled { background: #e5e7eb; color: #9ca3af; cursor: not-allowed; }

/* ── Contact form ────────────────────────────────────────────────────────── */
.dtc-scope.dtc-contact-form { max-width: 980px !important; width: 100% !important; }
.dtc-scope.dtc-contact-form .dtc-fields,
.dtc-scope.dtc-contact-form .dtc-btn { width: 100% !important; max-width: 100% !important; }
.dtc-scope.dtc-contact-form input[type="text"],
.dtc-scope.dtc-contact-form input[type="email"],
.dtc-scope.dtc-contact-form input[type="tel"],
.dtc-scope.dtc-contact-form select,
.dtc-scope.dtc-contact-form textarea { width: 100% !important; box-sizing: border-box; }

/* Optional H2 heading above the form */
.dtc-scope.dtc-contact-form .dtc-form-heading {
    margin: 0 0 20px; font-size: 1.6rem; font-weight: 800; color: #1f2430;
}

/* Two-column layout: image left, form right (stacks on mobile) */
.dtc-scope.dtc-contact-form .dtc-form-layout {
    display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start;
}
.dtc-scope.dtc-contact-form .dtc-form-image {
    flex: 0 0 var(--dtc-img-w, 40%);
    max-width: var(--dtc-img-w, 40%);
}
.dtc-scope.dtc-contact-form .dtc-form-image-img {
    width: 100%; height: auto; display: block;
    border-radius: 12px; object-fit: cover;
}
.dtc-scope.dtc-contact-form .dtc-form-body {
    flex: 1 1 0; min-width: 0;
}
/* When no image is rendered, the body is the only child — fill the row. */
.dtc-scope.dtc-contact-form:not(.dtc-has-image) .dtc-form-body {
    flex-basis: 100%;
}

@media (max-width: 720px) {
    .dtc-scope.dtc-contact-form .dtc-form-layout { gap: 20px; }
    .dtc-scope.dtc-contact-form .dtc-form-image,
    .dtc-scope.dtc-contact-form .dtc-form-body {
        flex: 1 1 100%; max-width: 100%;
    }
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
    .dtc-cal-wrap { flex-direction: column; }
    .dtc-scope    { padding: 20px 16px; }
    .dtc-cal-left, .dtc-cal-right { flex: none; width: 100%; }
}

/* ── Time selection summary box ──────────────────────────────────────────── */
.dtc-selection-summary { margin-top: 4px; }

.dtc-summary-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f9f5ff;
    border: 1px solid #a987c2;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    gap: 12px;
}
.dtc-summary-text {
    line-height: 1.5;
    font-size: 0.95rem;
    color: #1f2430;
}
.dtc-summary-text strong {
    font-size: 1rem;
    color: #3d2a52;
}
.dtc-change-time {
    background: none;
    border: 1px solid #a987c2;
    border-radius: 6px;
    color: #a987c2;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    flex-shrink: 0;
}
.dtc-change-time:hover {
    background: #f0e8ff;
}
