/**
 * CT Main Forms stylesheet
 * Based on themes/user/forms/legacy/forms_base.css
 * Passed via style_page on {exp:forms:form}
 */

/* STANDARD FIELDS — borders/padding restored for use with Tailwind preflight */
.dform_container input.text,
.dform_container input[type="text"],
.dform_container input[type="email"],
.dform_container input[type="tel"],
.dform_container input[type="url"],
.dform_container input[type="number"],
.dform_container input[type="password"] {
	box-sizing: border-box;
	width: 100%;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.5;
	letter-spacing: normal;
	color: #1e293b;
	background-color: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 0.5rem;
	padding: 0.625rem 0.75rem;
	outline: none;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.dform_container input.text:focus,
.dform_container input[type="text"]:focus,
.dform_container input[type="email"]:focus,
.dform_container input[type="tel"]:focus,
.dform_container input[type="url"]:focus,
.dform_container input[type="number"]:focus,
.dform_container input[type="password"]:focus,
.dform_container textarea:focus,
.dform_container select:focus {
	border-color: #5a89a8;
	box-shadow: 0 0 0 3px rgba(90, 137, 168, 0.3);
}

.dform_container textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 8rem;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.5;
	letter-spacing: normal;
	color: #1e293b;
	background-color: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 0.5rem;
	padding: 0.625rem 0.75rem;
	outline: none;
	resize: vertical;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.dform_container select {
	box-sizing: border-box;
	width: 100%;
	font-family: inherit;
	font-size: 1rem;
	letter-spacing: normal;
	color: #1e293b;
	background-color: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 0.5rem;
	padding: 0.625rem 0.75rem;
	outline: none;
}

.dform_container label {
	display: block;
}

.dform_element {
	margin: 0 0 1.5rem;
}

/* FIELD LABEL */
.dform_element .dform_label {
	display: block;
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #103c51;
	line-height: 1.3em;
}

.dftop_label .dform_label {
	margin: 0 0 0.5rem;
	display: block;
	clear: both;
}

.dfbottom_label .dform_label {
	margin: 0.5rem 0 0;
	display: block;
	clear: both;
}

.dfleft_label .dform_label {
	float: left;
	margin: 0.5rem 1rem 0 0;
	width: 29%;
}

.dfright_label .dform_label {
	float: left;
	margin: 0 1rem 0 0;
	width: 29%;
	text-align: right;
}

.dform_element .dform_required {
	color: #dc2626;
}

.dform_element .dform_optional {
	font-weight: 400;
	color: #64748b;
}

.dform_required_note {
	margin: 0 0 1.5rem;
	font-size: 0.8125rem;
	color: #64748b;
}

.dform_help {
	margin-top: 0.375rem;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: #64748b;
}

.dform_counter {
	display: flex;
	justify-content: flex-end;
	margin-top: 0.375rem;
	font-size: 0.75rem;
	line-height: 1.4;
	letter-spacing: 0.01em;
	color: #64748b;
	font-variant-numeric: tabular-nums;
}

.dform_counter.is-low {
	color: #9a6b12;
}

.dform_counter.is-empty {
	color: #103c51;
}

/* FIELD ERROR */
.dform_element .dform_error {
	display: block;
	margin-top: 0.25rem;
	font-weight: 600;
	font-size: 0.875rem;
	color: #dc2626;
}

.dform_error_summary {
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	color: #991b1b;
	background-color: #fef2f2;
	border: 1px solid #fecaca;
	border-left: 4px solid #dc2626;
	border-radius: 0.75rem;
	box-shadow: 0 1px 2px rgba(127, 29, 29, 0.05);
}

.dform_error_summary_title {
	margin: 0 0 0.25rem;
	font-size: 1rem;
	font-weight: 700;
	color: #7f1d1d;
}

.dform_error_summary p {
	margin-top: 0;
}

.dform_error_summary ul {
	margin: 0.5rem 0 0;
	padding-left: 1.25rem;
}

.dform_error_summary li + li {
	margin-top: 0.25rem;
}

.dform_has_error .dform_container input:not([type="hidden"]),
.dform_has_error .dform_container textarea,
.dform_has_error .dform_container select {
	border-color: #dc2626;
	background-color: #fffafa;
}

/*
 * Channel Form fields ({field:…}) emit bare inputs/textareas.
 * Keep them visually identical to Forms fields inside .dform_container.
 */
.dform_container input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.dform_container textarea,
.dform_container select {
	box-sizing: border-box;
	width: 100%;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.5;
	letter-spacing: normal;
	color: #1e293b;
	background-color: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 0.5rem;
	padding: 0.625rem 0.75rem;
	outline: none;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.dform_container textarea {
	min-height: 8rem;
	resize: vertical;
}

.dform_container input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
.dform_container textarea:focus,
.dform_container select:focus {
	border-color: #5a89a8;
	box-shadow: 0 0 0 3px rgba(90, 137, 168, 0.3);
}

/* INPUT CONTAINER */
.dfleft_label div.dform_container,
.dfright_label div.dform_container {
	float: left;
	width: 64%;
}

.dform_container label {
	font-weight: normal;
}

/* INNER CONTAINERS */
.dform_container .dfinput_left,
.dform_container .dfinput_right,
.dform_container .dfinput_full {
	display: block;
	min-height: 0;
	overflow: visible;
	margin-bottom: 0;
}

.dform_container .dfinput_left {
	float: left;
	width: 50%;
}

.dfinput_left input.text,
.dfinput_right input.text {
	width: 100%;
}

.dform_container .dfinput_right {
	float: right;
	width: 49%;
}

/* DATE FIELD */
.dfinput_dates .df_date_elem { width: 70px; float: left; }
.dfinput_dates .df_date_elem_extra { width: 100px; float: left; }
.dfinput_dates label { display: block; }
.dfinput_dates input.text { width: 90%; }
.dfinput_dates select { width: 90%; }

/* TIMES FIELD */
.dfinput_times .df_time_elem { width: 70px; float: left; }
.dfinput_times label { display: block; }
.dfinput_times input.text { width: 80%; }

/* PHONE FIELD */
.dfinput_phones .phone_cc { width: 15%; }
.dfinput_phones .phone_area { width: 15%; }
.dfinput_phones .phone_number { width: 40%; }
.dfinput_phones .phone_extension { width: 12.5%; }
.dfinput_phones input.text { width: 90%; }

/* NAME FIELD */
.dfinput_names .name_prefix { width: 15%; }
.dfinput_names .name_first { width: 30%; }
.dfinput_names .name_last { width: 30%; }
.dfinput_names .name_suffix { width: 15%; }
.dfinput_names input.text { width: 90%; }

/* ADDRESS FIELD */
.dform_address input.text { width: 90%; }
.dform_address .address_state input.text { width: 80%; }
.dform_address .address_country select { width: 80%; }

/* PRODUCTS FIELD */
.dfinput_products .df_qty_elem { width: 70px; float: left; }
.dfinput_products .df_products_elem { width: 150px; float: left; }
.dfinput_products label { display: block; }
.dfinput_products input.text { width: 90%; }
.dfinput_products select { width: 90%; }

/* RADIO/CHECKBOX */
.dform_element .checkboxes,
.dform_element .radios {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dform_element .checkboxes li,
.dform_element .radios li {
	margin: 0 0 0.5rem;
}

.dform_element .checkboxes label,
.dform_element .radios label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: normal;
	color: #334155;
	cursor: pointer;
}

/* COLUMNS */
.dfcolumns .column {
	min-height: 100px;
	float: left;
}

/* SUBMIT */
.dform .submit_button .dform_container,
.dform .submit_button .dfinput_full {
	min-height: 0;
	overflow: visible;
}

.dform input.submit,
.dform button.submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.25;
	color: #fff;
	background: linear-gradient(to bottom right, #103c51, #5a89a8);
	border: 0;
	border-radius: 0.75rem;
	padding: 0.75rem 1.5rem;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
	appearance: none;
	-webkit-appearance: none;
}

.dform input.submit:hover,
.dform button.submit:hover {
	filter: brightness(1.1);
}

.dform input.submit:focus,
.dform button.submit:focus {
	outline: 2px solid #f9ca49;
	outline-offset: 2px;
}

.dform button.submit:disabled {
	cursor: wait;
	filter: none;
	opacity: 0.72;
}

.dform button.submit.is-submitting::before {
	content: "";
	width: 1rem;
	height: 1rem;
	margin-right: 0.625rem;
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-top-color: #fff;
	border-radius: 9999px;
	animation: dform-spin 0.7s linear infinite;
}

@keyframes dform-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.dform button.submit.is-submitting::before {
		animation-duration: 1.4s;
	}
}

/* FORM CONFIRMATION MESSAGE */
.dform_confirmation {
	display: flex;
	align-items: flex-start;
	gap: 0.875rem;
	background-color: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
	border-radius: 0.75rem;
	margin-bottom: 1.5rem;
	padding: 1.25rem 1.5rem;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.dform_confirmation::before {
	content: "";
	flex: 0 0 1.5rem;
	width: 1.5rem;
	height: 1.5rem;
	margin-top: 0.1rem;
	border-radius: 9999px;
	background-color: #16a34a;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5 6.8 11.2 12 5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 0.9rem 0.9rem;
}

.dform_confirmation_title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.45;
	color: #14532d;
}

.dform_confirmation_body {
	margin: 0.25rem 0 0;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: #166534;
}

.dform_confirmation[hidden],
.dform_error_summary[hidden],
.dform_error[hidden] {
	display: none;
}

/* CART */
.dform_container .cart_qty_small {
	text-align: center;
	width: 30px;
}

/* CREDIT CARD */
.cc_number { position: relative; }
.cc_number input { width: 150px; }
.cc_name input { width: 300px; }
.cc_logos {
	height: 32px;
	margin-bottom: 5px;
	position: absolute;
	left: 160px;
	top: -4px;
}
.cc_logos .cc_icons {
	background-image: url(/themes/user/forms/legacy/img/creditcard_icons.png);
	background-repeat: no-repeat;
	float: left;
	height: 36px;
	margin-right: 4px;
	text-indent: -9000px;
	width: 36px;
}
.cc_logos .cc-visa { background-position: 0 0; }
.cc_logos .cc-mc { background-position: -36px 0; }
.cc_logos .cc-amex { background-position: -72px 0; }
.cc_logos .cc-discover { background-position: -108px 0; }
.cc_logos .cc-jcb { background-position: -180px 0; }
.cc_cardinfo { width: 400px; }
.cc_cardinfo .info_block { width: 40%; float: left; }
.cc_cardinfo .exp_month { width: 40%; margin-right: 9%; }
.cc_cardinfo .exp_year { width: 40%; }
.cc_cardinfo .cc_ccv { position: relative; }
.cc_cardinfo .cc_ccv input { width: 50px; }
.cc_cardinfo .ccv_img {
	background-image: url(/themes/user/forms/legacy/img/creditcard_icons.png);
	background-position: 0 -128px;
	background-repeat: no-repeat;
	display: block;
	height: 23px;
	left: 60px;
	position: absolute;
	width: 32px;
	top: 0;
}

/* Cart Product Options Multi */
.dform_cart_product_options_multi tfoot th { text-align: left; }
.dform_cart_product_options_multi .del { text-align: left; }
.dform_cart_product_options_multi .qty { width: 50px; }

/* Captcha field */
.dform_captcha .captcha-simple input { width: 150px; }
