/*
 * Vedham Core – forms, portals, quotation and booking pages.
 * Themes restyle everything through the custom properties below.
 */
:root {
	--vt-ink: #1d2433;
	--vt-muted: #545b6b;
	--vt-line: #d8d3c8;
	--vt-surface: #ffffff;
	--vt-surface-2: #f5f1e8;
	--vt-primary: #14325a;
	--vt-primary-hover: #0d2443;
	--vt-primary-ink: #ffffff;
	--vt-accent: #e3a23a;
	--vt-success: #1f6b3a;
	--vt-success-bg: #e6f3ea;
	--vt-danger: #9b2c22;
	--vt-danger-bg: #fbeceb;
	--vt-warn: #7a5100;
	--vt-warn-bg: #fdf3dc;
	--vt-info-bg: #e8f0f8;
	--vt-whatsapp: #1b7a43;
	--vt-radius: 8px;
	--vt-focus: 0 0 0 3px rgba(227, 162, 58, .55);
}

.vt-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Forms ---------- */
.vt-form-wrap { scroll-margin-top: 110px; }
.vt-form__title { margin: 0 0 .75rem; }
.vt-form__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem 1.1rem; }
.vt-field { grid-column: span 6; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
@media (min-width: 640px) {
	.vt-field--half { grid-column: span 3; }
	.vt-field--third { grid-column: span 2; }
}
.vt-field > label { font-weight: 600; color: var(--vt-ink); font-size: 1rem; }
.vt-req { color: var(--vt-danger); }
.vt-optional { font-weight: 400; color: var(--vt-muted); font-size: .9em; }
.vt-form input[type=text], .vt-form input[type=tel], .vt-form input[type=email], .vt-form input[type=url],
.vt-form input[type=number], .vt-form input[type=date], .vt-form select, .vt-form textarea,
.vt-pax input, .vt-pax select, .vt-portal input[type=text], .vt-portal input[type=password] {
	width: 100%; min-height: 48px; padding: .65rem .8rem; font: inherit; font-size: 1.0625rem; color: var(--vt-ink);
	background: var(--vt-surface); border: 1.5px solid var(--vt-line); border-radius: calc(var(--vt-radius) - 2px); box-sizing: border-box;
}
.vt-form textarea { min-height: 110px; resize: vertical; }
.vt-form input:focus, .vt-form select:focus, .vt-form textarea:focus, .vt-pax input:focus, .vt-pax select:focus, .vt-portal input:focus {
	outline: none; border-color: var(--vt-primary); box-shadow: var(--vt-focus);
}
.vt-field--error input, .vt-field--error select, .vt-field--error textarea { border-color: var(--vt-danger); }
.vt-help { margin: 0; color: var(--vt-muted); font-size: .9rem; line-height: 1.45; }
.vt-check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; cursor: pointer; line-height: 1.45; }
.vt-check input { width: 22px; height: 22px; margin: .1rem 0 0; flex: none; accent-color: var(--vt-primary); }
.vt-form__actions { margin-top: 1.25rem; }
.vt-form__privacy { margin: .9rem 0 0; font-size: .875rem; color: var(--vt-muted); }

/* ---------- Buttons ---------- */
.vt-button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.4rem;
	font: inherit; font-weight: 600; font-size: 1.0625rem; line-height: 1.2; text-decoration: none; border-radius: var(--vt-radius);
	border: 2px solid transparent; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.vt-button:focus-visible { outline: none; box-shadow: var(--vt-focus); }
.vt-button--primary { background: var(--vt-primary); color: var(--vt-primary-ink); }
.vt-button--primary:hover { background: var(--vt-primary-hover); color: var(--vt-primary-ink); }
.vt-button--secondary { background: transparent; color: var(--vt-primary); border-color: var(--vt-primary); }
.vt-button--secondary:hover { background: var(--vt-primary); color: var(--vt-primary-ink); }
.vt-button--whatsapp { background: var(--vt-whatsapp); color: #fff; }
.vt-button--whatsapp:hover { background: #14603a; color: #fff; }
.vt-button--small { min-height: 38px; padding: .4rem .9rem; font-size: .95rem; }
.vt-button[disabled] { opacity: .65; cursor: progress; }

/* ---------- Notices ---------- */
.vt-notice { border-radius: var(--vt-radius); padding: 1rem 1.2rem; margin: 0 0 1.25rem; border-left: 5px solid; }
.vt-notice:focus { outline: none; }
.vt-notice h3 { margin: 0 0 .4rem; font-size: 1.2rem; }
.vt-notice p { margin: .35rem 0; }
.vt-notice ul { margin: .4rem 0 0 1.1rem; padding: 0; }
.vt-notice--success { background: var(--vt-success-bg); border-color: var(--vt-success); }
.vt-notice--error { background: var(--vt-danger-bg); border-color: var(--vt-danger); }
.vt-notice--warning { background: var(--vt-warn-bg); border-color: #c58a12; }
.vt-notice--info { background: var(--vt-info-bg); border-color: var(--vt-primary); }

/* ---------- Badges ---------- */
.vt-badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .82rem; font-weight: 600; background: #eceff3; color: #374151; white-space: nowrap; vertical-align: middle; }
.vt-badge--new, .vt-badge--requested, .vt-badge--unpaid, .vt-badge--pending { background: var(--vt-warn-bg); color: var(--vt-warn); }
.vt-badge--sent, .vt-badge--provisional, .vt-badge--advance_received, .vt-badge--quote_sent, .vt-badge--contacted, .vt-badge--follow_up, .vt-badge--refund_pending { background: var(--vt-info-bg); color: var(--vt-primary); }
.vt-badge--accepted, .vt-badge--confirmed, .vt-badge--paid, .vt-badge--won, .vt-badge--completed { background: var(--vt-success-bg); color: var(--vt-success); }
.vt-badge--declined, .vt-badge--cancelled, .vt-badge--lost { background: var(--vt-danger-bg); color: var(--vt-danger); }

/* ---------- Tables ---------- */
.vt-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1rem; }
.vt-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.vt-table th, .vt-table td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--vt-line); vertical-align: top; }
.vt-table thead th { font-size: .88rem; color: var(--vt-muted); font-weight: 600; border-bottom-width: 2px; }
.vt-table small { color: var(--vt-muted); }
.vt-num { text-align: right !important; white-space: nowrap; }
.vt-table tfoot th { text-align: right; font-weight: 400; }
.vt-table tfoot .vt-total th, .vt-table tfoot .vt-total td { font-weight: 700; font-size: 1.15rem; border-top: 2px solid var(--vt-ink); }
.vt-table--form td { padding: .35rem; min-width: 90px; }
.vt-table--form td:first-child { min-width: 180px; }
.vt-input--short { max-width: 90px; }

/* Itemised table becomes stacked rows on phones: description, then qty × rate and amount. */
@media (max-width: 640px) {
	.vt-table--items thead { display: none; }
	.vt-table--items tbody tr { display: grid; grid-template-columns: auto auto 1fr; gap: .15rem .4rem; padding: .7rem 0; border-bottom: 1px solid var(--vt-line); }
	.vt-table--items tbody td { border: 0; padding: 0; }
	.vt-table--items tbody td:first-child { grid-column: 1 / -1; margin-bottom: .2rem; }
	.vt-table--items tbody td:nth-child(2), .vt-table--items tbody td:nth-child(3) { text-align: left !important; color: var(--vt-muted); }
	.vt-table--items tbody td:nth-child(3)::before { content: "× "; }
	.vt-table--items tbody td:nth-child(4) { font-weight: 600; }
	.vt-table--items tfoot tr { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--vt-line); }
	.vt-table--items tfoot th, .vt-table--items tfoot td { border: 0; padding: .5rem 0; text-align: left; }
	.vt-table--items tfoot .vt-total { border-top: 2px solid var(--vt-ink); }
	.vt-table--items tfoot .vt-total th, .vt-table--items tfoot .vt-total td { border: 0; }
	.vt-table-wrap:has(> .vt-table--items) { overflow-x: visible; }
	.vt-table--form { min-width: 640px; }
}

/* ---------- Documents (quotation / booking) ---------- */
.vt-doc { max-width: 60rem; }
.vt-doc__head { padding-bottom: 1rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--vt-line); }
.vt-doc__ref { margin: 0 0 .25rem; color: var(--vt-muted); font-size: .95rem; }
.vt-doc__title { margin: 0 0 1rem; }
.vt-doc__lead { font-size: 1.08rem; }
.vt-doc__section { margin: 0 0 1.75rem; }
.vt-doc__section h3 { margin: 0 0 .65rem; }
.vt-doc__cols { display: grid; gap: 0 2rem; }
@media (min-width: 720px) { .vt-doc__cols { grid-template-columns: 1fr 1fr; } }
.vt-doc__terms { font-size: .95rem; color: var(--vt-muted); }
.vt-doc__actions { margin: 0 0 1.75rem; display: flex; gap: .75rem; flex-wrap: wrap; }
.vt-doc__decision { background: var(--vt-surface-2); border-radius: var(--vt-radius); padding: 1.25rem 1.4rem; }
.vt-doc__decision .vt-check { margin: .75rem 0 1rem; }
.vt-decline { margin-top: 1rem; }
.vt-decline summary { cursor: pointer; color: var(--vt-muted); text-decoration: underline; }
.vt-prewrap { white-space: pre-wrap; line-height: 1.6; }
.vt-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .9rem 1.5rem; margin: 0; }
.vt-facts div { min-width: 0; }
.vt-facts dt { font-size: .85rem; color: var(--vt-muted); margin: 0; }
.vt-facts dd { margin: .1rem 0 0; font-weight: 600; }
.vt-ticks, .vt-crosses { list-style: none; margin: 0; padding: 0; }
.vt-ticks li, .vt-crosses li { padding: .3rem 0 .3rem 1.6rem; position: relative; }
.vt-ticks li::before { content: ""; position: absolute; left: .2rem; top: .7rem; width: .75rem; height: .4rem; border-left: 2.5px solid var(--vt-success); border-bottom: 2.5px solid var(--vt-success); transform: rotate(-45deg); }
.vt-crosses li::before, .vt-crosses li::after { content: ""; position: absolute; left: .25rem; top: .85rem; width: .8rem; height: 2.5px; background: var(--vt-danger); transform: rotate(45deg); }
.vt-crosses li::after { transform: rotate(-45deg); }

.vt-checklist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--vt-line); border-radius: var(--vt-radius); }
.vt-checklist__item { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-bottom: 1px solid var(--vt-line); }
.vt-checklist__item:last-child { border-bottom: 0; }
.vt-checklist__state { font-weight: 600; white-space: nowrap; color: var(--vt-warn); }
.vt-checklist__item--confirmed .vt-checklist__state { color: var(--vt-success); }
.vt-pay { background: var(--vt-surface-2); padding: 1.25rem 1.4rem; border-radius: var(--vt-radius); }
.vt-pay__amount { font-size: 2rem; font-weight: 700; margin: 0 0 .75rem; color: var(--vt-primary); }
.vt-pay__status { min-height: 1.4em; font-weight: 600; }
.vt-bank { margin-top: 1rem; }
.vt-bank summary { cursor: pointer; font-weight: 600; }

/* ---------- Portals ---------- */
.vt-portal { max-width: 64rem; }
.vt-portal--login { max-width: 34rem; }
.vt-portal__who { color: var(--vt-muted); }
.vt-portal__section { margin: 0 0 2rem; }
.vt-portal__aside { color: var(--vt-muted); font-size: .95rem; margin-top: 1.25rem; }
.vt-list { margin: 0; padding-left: 1.1rem; }
.vt-list li { margin: .4rem 0; }
.vt-tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 2px solid var(--vt-line); margin: 0 0 1.5rem; }
.vt-tabs__link { padding: .6rem .9rem; text-decoration: none; color: var(--vt-muted); border-bottom: 3px solid transparent; margin-bottom: -2px; font-weight: 600; }
.vt-tabs__link:hover { color: var(--vt-ink); }
.vt-tabs__link.is-active { color: var(--vt-primary); border-bottom-color: var(--vt-accent); }
.vt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 0 0 1.5rem; }
.vt-stat { background: var(--vt-surface-2); padding: 1rem 1.1rem; border-radius: var(--vt-radius); color: var(--vt-muted); }
.vt-stat__n { display: block; font-size: 2rem; font-weight: 700; color: var(--vt-primary); line-height: 1.1; }
.vt-agent-pkg { border: 1px solid var(--vt-line); border-radius: var(--vt-radius); padding: .8rem 1rem; margin-bottom: .6rem; }
.vt-agent-pkg summary { cursor: pointer; }
.vt-agent-pkg__notes { background: var(--vt-surface-2); padding: .75rem; border-radius: 6px; margin: .75rem 0; }
#loginform p { margin: 0 0 1rem; display: flex; flex-direction: column; gap: .35rem; }
#loginform .login-remember { flex-direction: row; }
#loginform input[type=submit] { min-height: 48px; padding: .7rem 1.4rem; font: inherit; font-weight: 600; background: var(--vt-primary); color: var(--vt-primary-ink); border: 0; border-radius: var(--vt-radius); cursor: pointer; }

/* ---------- Package list (shortcode) ---------- */
.vt-package-list { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 1.5rem 0; }
.vt-package-card { border: 1px solid var(--vt-line); border-radius: var(--vt-radius); overflow: hidden; background: var(--vt-surface); }
.vt-package-card__media img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.vt-package-card__body { padding: 1rem 1.1rem 1.2rem; }
.vt-package-card__title { margin: 0 0 .3rem; font-size: 1.2rem; }
.vt-package-card__meta { margin: 0 0 .5rem; color: var(--vt-muted); font-size: .95rem; }
.vt-package-card__price { font-weight: 600; margin: .5rem 0 0; }

@media (prefers-reduced-motion: reduce) { .vt-button { transition: none; } }
.vt-form__intro { margin: -.25rem 0 1rem; }
