/* ==========================================================
   other_service.css
   บริการใช้พื้นที่ถ่ายทำและผลิตสื่อ — ฟอร์มขอเช่าสถานที่
   ไฟล์นี้รวมทุกส่วน (rate table, form, multi-date rows, price summary)
   ใช้แทนที่ไฟล์เดิมทั้งไฟล์ได้เลย
   ========================================================== */

/* ---------- Section wrapper ---------- */
.rent-form {
    padding: 3rem 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    box-sizing: border-box;
}

.rent-form *,
.rent-form *::before,
.rent-form *::after {
    box-sizing: border-box;
}

.rent-form__head {
    text-align: center;
    margin-bottom: 2.5rem;
}

.rent-form__head h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text, #1a1a1a);
    margin-bottom: 0.5rem;
}

.rent-form__sub {
    color: var(--text-muted, #666);
    max-width: 560px;
    margin: 0 auto;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ---------- Rate table ---------- */
.rate-table-wrap {
    max-width: 800px;
    margin: 0 auto 2.5rem;
    box-sizing: border-box;
}

.rate-table-wrap h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text, #1a1a1a);
    margin-bottom: 0.75rem;
}

.rate-table__scroll {
    overflow-x: auto;
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 10px;
}

.rate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 620px;
}

.rate-table th,
.rate-table td {
    padding: 0.7rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--border, #eee);
    vertical-align: top;
}

.rate-table th {
    background: var(--surface-2, #f7f7f8);
    font-weight: 600;
    color: var(--text, #1a1a1a);
}

.rate-table td {
    color: var(--text-muted, #555);
}

.rate-table__note {
    font-size: 0.8rem;
    color: var(--text-muted, #888);
}

.rate-table tbody tr:last-child td {
    border-bottom: none;
}

.rate-table__hint {
    font-size: 0.78rem;
    color: var(--text-muted, #888);
    margin-top: 0.6rem;
    line-height: 1.5;
}

/* ---------- Form card ---------- */
.rent-form__form {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 14px;
    padding: 2rem;
    box-sizing: border-box;
}

.rent-form__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 1.5rem;
}

.rent-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.rent-form__field--full {
    grid-column: 1 / -1;
}

.rent-form__field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text, #1a1a1a);
}

.rent-form__field .req {
    color: #d64545;
}

.rent-form__field input,
.rent-form__field select,
.rent-form__field textarea {
    width: 100%;
    font-family: 'Prompt', sans-serif;
    font-size: 0.95rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border, #d8d8d8);
    border-radius: 8px;
    background: var(--surface-2, #fafafa);
    color: var(--text, #1a1a1a);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rent-form__field input:focus,
.rent-form__field select:focus,
.rent-form__field textarea:focus {
    outline: none;
    border-color: var(--accent, #0a6fd6);
    box-shadow: 0 0 0 3px var(--accent-soft, rgba(10, 111, 214, 0.15));
}

.rent-form__field textarea {
    resize: vertical;
    min-height: 100px;
}

.rent-form__hint {
    font-size: 0.8rem;
    color: var(--text-muted, #888);
}

.rent-form__submit {
    margin-top: 2rem;
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: var(--accent, #0a6fd6);
    color: #fff;
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.rent-form__submit:hover {
    opacity: 0.9;
}

/* ---------- Multi-date rows ---------- */
.date-rows {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.date-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.75rem;
    border: 1px solid var(--border, #d8d8d8);
    border-radius: 10px;
    background: var(--surface-2, #fafafa);
}

.date-row__date,
.date-row__time {
    font-family: 'Prompt', sans-serif;
    font-size: 0.9rem;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--border, #d8d8d8);
    border-radius: 8px;
    background: var(--card-bg, #fff);
    color: var(--text, #1a1a1a);
}

.date-row__time-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.date-row__sep {
    color: var(--text-muted, #888);
}

.date-row__subtotal {
    margin-left: auto;
    font-weight: 600;
    color: var(--accent, #0a6fd6);
    font-size: 0.9rem;
    white-space: nowrap;
}

.date-row__remove {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: var(--border, #e5e5e5);
    color: var(--text, #444);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.date-row__remove:hover {
    background: #d64545;
    color: #fff;
}

.date-rows__add {
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    border: 1px dashed var(--accent, #0a6fd6);
    border-radius: 8px;
    background: transparent;
    color: var(--accent, #0a6fd6);
    font-family: 'Prompt', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
}

.date-rows__add:hover {
    background: var(--accent-soft, rgba(10, 111, 214, 0.08));
}

/* ---------- Price summary ---------- */
.price-summary {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    background: var(--accent-soft, rgba(10, 111, 214, 0.06));
    border: 1px solid var(--accent, #0a6fd6);
}

.price-summary__row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text, #1a1a1a);
    padding: 0.3rem 0;
}

.price-summary__row--total {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent, #0a6fd6);
    border-top: 1px solid var(--border, rgba(10, 111, 214, 0.25));
    margin-top: 0.4rem;
    padding-top: 0.6rem;
}

.price-summary__hint {
    font-size: 0.78rem;
    color: var(--text-muted, #888);
    margin-top: 0.5rem;
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] .rate-table th {
    background: var(--surface-2, #232325);
}

[data-theme="dark"] .rent-form__form {
    background: var(--card-bg, #1c1c1e);
    border-color: var(--border, #333);
}

[data-theme="dark"] .rent-form__field input,
[data-theme="dark"] .rent-form__field select,
[data-theme="dark"] .rent-form__field textarea {
    background: var(--surface-2, #2a2a2c);
    border-color: var(--border, #3a3a3c);
    color: var(--text, #f5f5f5);
}

[data-theme="dark"] .date-row {
    background: var(--surface-2, #232325);
    border-color: var(--border, #3a3a3c);
}

[data-theme="dark"] .date-row__date,
[data-theme="dark"] .date-row__time {
    background: var(--card-bg, #1c1c1e);
    border-color: var(--border, #3a3a3c);
    color: var(--text, #f5f5f5);
}

[data-theme="dark"] .price-summary {
    background: rgba(10, 111, 214, 0.12);
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
    .rent-form__grid {
        grid-template-columns: 1fr;
    }

    .rent-form__form {
        padding: 1.5rem;
    }

    .date-row {
        flex-direction: column;
        align-items: stretch;
    }

    .date-row__subtotal {
        margin-left: 0;
        text-align: right;
    }
}

/* ---------- Date/Time picker icon visibility ---------- */
.date-row__date::-webkit-calendar-picker-indicator,
.date-row__time::-webkit-calendar-picker-indicator {
    cursor: pointer;
    padding: 4px;
    margin-left: 4px;
    border-radius: 5px;
    background-color: var(--accent, #0a6fd6);
    filter: invert(1) brightness(2);
    /* ทำให้ไอคอน default (ดำ) กลายเป็นขาว มองเห็นชัดบนพื้นสี accent */
    opacity: 0.9;
    transition: opacity 0.15s ease;
}

.date-row__date::-webkit-calendar-picker-indicator:hover,
.date-row__time::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* ให้ตัวช่อง input มีพื้นที่คลิกไอคอนสบายขึ้น */
.date-row__date,
.date-row__time {
    padding-right: 0.5rem;
}

/* Firefox ไม่รองรับการปรับสไตล์ indicator แบบนี้ได้เต็มที่
   แต่เพิ่ม border ให้เห็นขอบช่องชัดขึ้นเป็นการชดเชย */
@-moz-document url-prefix() {

    .date-row__date,
    .date-row__time {
        border-width: 1.5px;
    }
}

.rent-form__field select.is-locked {
  cursor: not-allowed;
  background: var(--surface-2, #f0f0f0);
  color: var(--text-muted, #888);
  opacity: 0.85;
}

[data-theme="dark"] .rent-form__field select.is-locked {
  background: var(--surface-2, #2a2a2c);
}

.form-alert {
  max-width: 800px;
  margin: 1.5rem auto 0;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: formAlertIn 0.3s ease;
}

@keyframes formAlertIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.form-alert__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.form-alert__body { flex: 1; }

.form-alert__body strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.98rem;
}

.form-alert__body p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.form-alert__list {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  line-height: 1.7;
}

.form-alert__close {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
}

.form-alert__close:hover { opacity: 1; }

.form-alert--success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid #22c55e;
  color: #15803d;
}
.form-alert--success .form-alert__icon {
  background: #22c55e;
  color: #fff;
}

.form-alert--error {
  background: rgba(214, 69, 69, 0.08);
  border: 1px solid #d64545;
  color: #b91c1c;
}
.form-alert--error .form-alert__icon {
  background: #d64545;
  color: #fff;
}

[data-theme="dark"] .form-alert--success {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}
[data-theme="dark"] .form-alert--error {
  background: rgba(214, 69, 69, 0.12);
  color: #f87171;
}