/* Tocaan Forms — base layout on top of the theme's form styles. Stable classes:
   .tcf-form .tcf-fields .tcf-row .tcf-type-{type} .tcf-field-{id} .tcf-label .tcf-control
   .tcf-help .tcf-error .tcf-submit .tcf-message .tcf-success .tcf-failure .tcf-done */
.tcf-form .tcf-fields { display: flex; flex-wrap: wrap; gap: 0 4%; }
.tcf-form .tcf-row { width: 100%; }
.tcf-form .tcf-w-half { width: 48%; }
@media (max-width: 600px) { .tcf-form .tcf-w-half { width: 100%; } }
.tcf-form .tcf-submit-row { width: 100%; }
.tcf-form .tcf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.tcf-form .tcf-choices { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tcf-form .tcf-choice { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: normal; }
.tcf-form .tcf-help { font-size: .85em; opacity: .7; margin-top: 4px; }
.tcf-form .tcf-error:empty { display: none; }
.tcf-form .tcf-invalid .tcf-error { display: block; }
.tcf-form .tcf-message:empty { display: none; }
.tcf-form .tcf-message { margin-top: 12px; padding: 12px 16px; border-radius: 8px; }
.tcf-form .tcf-message.tcf-success { background: #ecfdf5; color: #065f46; }
.tcf-form .tcf-message.tcf-failure { background: #fef2f2; color: #991b1b; }
.tcf-form.tcf-done .tcf-fields { display: none; }
.tcf-form.tcf-busy .tcf-submit { cursor: progress; }

/* Choices and file input are drawn here, independent of the theme's field colours
   (the theme paints every input with its field background). Override with the variables. */
.tcf-form { --tcf-ink: #132949; --tcf-line: #d4dde6; --tcf-accent: #132949; --tcf-focus: rgba(245,180,0,.45); --tcf-field-bg: #fff; }
.tcf-form .tcf-choice input[type="checkbox"], .tcf-form .tcf-choice input[type="radio"] {
	-webkit-appearance: none; appearance: none; flex: 0 0 auto; box-sizing: border-box;
	width: 20px !important; height: 20px !important; min-width: 20px; min-height: 0; padding: 0 !important; margin: 0 !important;
	background: var(--tcf-field-bg) !important; color: transparent !important; border: 1.5px solid var(--tcf-line) !important; border-radius: 5px !important;
	box-shadow: none !important; cursor: pointer; position: relative; line-height: 1; font-size: 0 !important;
	transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.tcf-form .tcf-choice input[type="radio"] { border-radius: 50% !important; }
.tcf-form .tcf-choice input::before, .tcf-form .tcf-choice input::after { content: none; }
.tcf-form .tcf-choice input[type="checkbox"]:checked { background: var(--tcf-accent) !important; border-color: var(--tcf-accent) !important; }
.tcf-form .tcf-choice input[type="checkbox"]:checked::after {
	content: ""; position: absolute; left: 50%; top: 45%; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0;
	transform: translate(-50%, -50%) rotate(45deg);
}
.tcf-form .tcf-choice input[type="radio"]:checked { border-color: var(--tcf-accent) !important; }
.tcf-form .tcf-choice input[type="radio"]:checked::after {
	content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--tcf-accent);
}
.tcf-form .tcf-choice input:hover { border-color: var(--tcf-accent) !important; }
.tcf-form .tcf-choice input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--tcf-focus) !important; }
.tcf-form .tcf-choice span { color: var(--tcf-ink); }
.tcf-form .tcf-consent { align-items: flex-start; }
.tcf-form .tcf-consent input { margin-top: 2px !important; }
.tcf-form .tcf-invalid .tcf-choice input { border-color: #dc2626 !important; }
.tcf-form input[type="file"] {
	width: 100%; height: auto !important; padding: 10px !important; box-sizing: border-box; cursor: pointer;
	background: var(--tcf-field-bg) !important; color: var(--tcf-ink) !important;
	border: 1.5px dashed var(--tcf-line) !important; border-radius: 10px !important; font-size: .95em;
}
.tcf-form input[type="file"]:hover { border-color: var(--tcf-accent) !important; }
.tcf-form input[type="file"]::file-selector-button {
	margin-inline-end: 12px; padding: 8px 16px; border: 0; border-radius: 8px; cursor: pointer;
	background: var(--tcf-accent); color: #fff; font: inherit; font-weight: 600;
}
.tcf-form select, .tcf-form textarea, .tcf-form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
	background-color: var(--tcf-field-bg); color: var(--tcf-ink);
}
.tcf-form input[type="date"], .tcf-form input[type="time"], .tcf-form input[type="datetime-local"], .tcf-form input[type="month"] { cursor: pointer; }
.tcf-form input[type="date"]::-webkit-calendar-picker-indicator, .tcf-form input[type="time"]::-webkit-calendar-picker-indicator { cursor: pointer; }

/* Date picker */
.tcf-form .tcf-date-view { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23132949' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='3.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 20px; background-position: right 14px center; padding-right: 44px !important; }
.tcf-form .tcf-date-view.is-rtl { background-position: left 14px center; padding-right: 14px !important; padding-left: 44px !important; }
.tcf-dp { position: absolute; z-index: 9999; width: 316px; max-width: calc(100vw - 24px); box-sizing: border-box; padding: 14px; background: #fff; color: #132949; border: 1px solid #e6ebf1; border-radius: 20px; box-shadow: 0 18px 48px rgba(19,41,73,.18), 0 2px 6px rgba(19,41,73,.06); font-size: 14px; line-height: 1.2; animation: tcfDpIn .16s ease-out; }
@keyframes tcfDpIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.tcf-dp * { box-sizing: border-box; }
.tcf-dp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tcf-dp-sels { flex: 1; display: flex; gap: 6px; min-width: 0; }
.tcf-dp.tcf-dp.tcf-dp select.tcf-dp-sel { flex: 1 1 0; width: auto !important; min-width: 0; height: 38px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; padding-inline-start: 10px !important; padding-inline-end: 26px !important; text-indent: 0 !important; border: 1px solid #e6ebf1 !important; border-radius: 12px !important; background: #f5f7fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23132949' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center / 12px !important; color: #132949 !important; font-family: inherit !important; font-size: 14px !important; line-height: 36px !important; font-weight: 700 !important; text-overflow: ellipsis; -webkit-appearance: none !important; appearance: none !important; cursor: pointer; box-shadow: none !important; }
.tcf-dp.tcf-dp.tcf-dp[dir="rtl"] select.tcf-dp-sel { background-position: left 9px center !important; }
.tcf-dp.tcf-dp.tcf-dp select.tcf-dp-sel + select.tcf-dp-sel { flex: 0 0 86px; }
.tcf-dp.tcf-dp.tcf-dp select.tcf-dp-sel:hover { background-color: #eef2f8 !important; }
.tcf-dp .tcf-dp-day, .tcf-dp .tcf-dp-nav, .tcf-dp-foot button { min-height: 0 !important; line-height: 1 !important; font-size: 14px; letter-spacing: 0; text-transform: none; }
.tcf-dp.tcf-dp.tcf-dp select.tcf-dp-sel:focus { outline: none; box-shadow: 0 0 0 3px rgba(245,180,0,.45) !important; }
.tcf-dp .tcf-dp-nav { width: 38px; height: 38px; flex: 0 0 38px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 12px; background: #f5f7fb; color: #132949; cursor: pointer; padding: 0; transition: background .15s; }
.tcf-dp .tcf-dp-nav:hover { background: #132949; color: #fff; }
.tcf-dp-week, .tcf-dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.tcf-dp-week span { text-align: center; font-size: 11.5px; font-weight: 700; color: #8a96a8; padding: 4px 0 6px; }
.tcf-dp .tcf-dp-day { height: 38px; border: 0; border-radius: 12px; background: transparent; color: #132949; font: inherit; font-weight: 600; cursor: pointer; padding: 0; transition: background .12s, color .12s; }
.tcf-dp .tcf-dp-day:hover { background: #fff4d1; }
.tcf-dp .tcf-dp-day.is-other { color: #b8c1ce; font-weight: 500; }
.tcf-dp .tcf-dp-day.is-today { box-shadow: inset 0 0 0 1.5px #f5b400; }
.tcf-dp .tcf-dp-day.is-selected { background: #132949; color: #fff; box-shadow: 0 4px 12px rgba(19,41,73,.28); }
.tcf-dp .tcf-dp-day:disabled { color: #d5dbe3; cursor: not-allowed; background: transparent; text-decoration: line-through; }
.tcf-dp .tcf-dp-day:focus-visible, .tcf-dp .tcf-dp-nav:focus-visible, .tcf-dp-foot button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(245,180,0,.55); }
.tcf-dp-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #eef1f5; }
.tcf-dp-foot button { border: 0; border-radius: 999px; padding: 8px 18px; font: inherit; font-weight: 700; cursor: pointer; }
.tcf-dp .tcf-dp-today { background: #f5b400; color: #132949; }
.tcf-dp .tcf-dp-today:hover { background: #e3a700; }
.tcf-dp .tcf-dp-clear { background: #f5f7fb; color: #5b6b82; }
.tcf-dp .tcf-dp-clear:hover { background: #eef2f8; color: #132949; }
.tcf-dp-backdrop { position: fixed; inset: 0; z-index: 99998; background: rgba(15,23,42,.45); animation: tcfFade .16s ease-out; }
@keyframes tcfFade { from { opacity: 0; } to { opacity: 1; } }
.tcf-dp.tcf-dp-sheet { position: fixed; z-index: 99999; left: 12px; right: 12px; bottom: 12px; top: auto; width: auto; max-width: none; margin: 0 auto; max-width: 420px; padding: 18px; border-radius: 24px; font-size: 15px; animation: tcfSheet .2s ease-out; }
@keyframes tcfSheet { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.tcf-dp.tcf-dp-sheet .tcf-dp-day { height: 44px; }
