/**
 * [raq_form] frontend styles. Per-form overrides are scoped by an
 * instance class and printed inline in the footer (see
 * raq_form_build_scoped_css). This file is the base layout the
 * overrides ride on top of.
 */

.raq-form { max-width: 100%; margin: 0; }
.raq-form * { box-sizing: border-box; }
.raq-form__form { display: block; }

.raq-form__rows {
	display: flex; flex-wrap: wrap; gap: 14px;
}

.raq-form__row {
	display: flex; flex-direction: column;
	width: 100%;
}
.raq-form__row--half {
	width: calc(50% - 7px);
}
@media (max-width: 600px) {
	.raq-form__row--half { width: 100%; }
}

.raq-form__label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 6px;
	color: #1f2937;
}
.raq-form__req { color: #b32d2e; margin-left: 2px; }

.raq-form__group-label {
	font-size: 14px; font-weight: 600;
	margin: 0 0 6px; color: #1f2937;
}
.raq-form__group-grid {
	display: flex; flex-wrap: wrap; gap: 8px; width: 100%;
}
.raq-form__group-cell { display: flex; flex-direction: column; }
.raq-form__group-cell--full { width: 100%; }
.raq-form__group-cell--half { width: calc(50% - 4px); }
@media (max-width: 600px) {
	.raq-form__group-cell--half { width: 100%; }
}
.raq-form__group-cell .raq-form__label { font-size: 12px; font-weight: 500; color: #555; margin-bottom: 4px; }

.raq-form__input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	background: #fff;
	color: #111827;
	font: inherit;
	line-height: 1.4;
	transition: border-color .15s ease;
}
.raq-form__input:focus {
	outline: 0;
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}
.raq-form__textarea { min-height: 100px; resize: vertical; }

.raq-form__choices { display: flex; flex-direction: column; gap: 6px; }
.raq-form__choice {
	display: flex; align-items: center; gap: 8px;
	font-size: 14px; color: #1f2937; cursor: pointer;
}
.raq-form__choice input { margin: 0; }
.raq-form__choice--single { font-weight: 400; }

.raq-form__honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important; height: 1px !important;
	opacity: 0 !important; pointer-events: none !important;
}

.raq-form__messages {
	margin-top: 10px;
	font-size: 14px;
}
.raq-form__messages.is-error { color: #b32d2e; }
.raq-form__messages.is-info  { color: #555; }

.raq-form__submit {
	display: inline-flex; align-items: center; gap: 8px;
	margin-top: 14px;
	padding: 10px 18px;
	border: 0; border-radius: 4px;
	background: #2271b1; color: #fff;
	font: inherit; font-weight: 600;
	cursor: pointer;
	transition: background-color .15s ease, opacity .15s ease;
}
.raq-form__submit:hover { background: #135e96; }
.raq-form__submit:disabled { opacity: 0.6; cursor: not-allowed; }

.raq-form__submit-spinner {
	display: none;
	width: 14px; height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: raq-spin 0.8s linear infinite;
}
.raq-form.is-submitting .raq-form__submit-spinner { display: inline-block; }
@keyframes raq-spin {
	to { transform: rotate(360deg); }
}

.raq-form__success {
	background: #ecfdf5;
	border: 1px solid #6ee7b7;
	color: #065f46;
	padding: 14px 16px;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.5;
}

.raq-form__rc-v2 { margin: 10px 0; }

/* ============================================================
 * Drag-and-drop file upload (replaces the bare <input type=file>
 * for any field of type=file). Hidden native input + visible
 * drop zone + thumbnail row.
 * ============================================================ */

.raq-form__file-wrap {
	border: 2px dashed #d1d5db;
	border-radius: 6px;
	background: #fafafa;
	padding: 18px 16px;
	text-align: center;
	cursor: pointer;
	transition: border-color .15s, background-color .15s;
}
.raq-form__file-wrap:hover,
.raq-form__file-wrap.is-hover {
	border-color: #2271b1;
	background: #eff6ff;
}
.raq-form__file-wrap.has-files { text-align: left; padding: 14px; }
.raq-form__file-wrap input[type="file"] { display: none; }

.raq-form__file-prompt {
	color: #555;
	font-size: 14px;
	line-height: 1.45;
}
.raq-form__file-prompt strong { color: #2271b1; }
.raq-form__file-prompt small {
	display: block;
	margin-top: 4px;
	color: #888;
	font-size: 12px;
}

.raq-form__file-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 10px;
	margin-top: 12px;
}
.raq-form__file-tile {
	position: relative;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	overflow: hidden;
	font-size: 12px;
}
.raq-form__file-thumb {
	width: 100%;
	height: 90px;
	background: #f3f4f6 center/cover no-repeat;
	display: flex; align-items: center; justify-content: center;
	color: #888; font-size: 26px;
}
.raq-form__file-meta {
	padding: 6px 8px;
	display: flex; flex-direction: column; gap: 2px;
	min-height: 38px;
}
.raq-form__file-name {
	font-weight: 500; color: #1f2937;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.raq-form__file-size { color: #888; font-size: 11px; }
.raq-form__file-remove {
	position: absolute; top: 4px; right: 4px;
	width: 22px; height: 22px;
	border: 0; border-radius: 50%;
	background: rgba(0, 0, 0, 0.65); color: #fff;
	font-size: 14px; line-height: 1;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	padding: 0;
}
.raq-form__file-remove:hover { background: #b32d2e; }
.raq-form__file-tile.is-error { border-color: #b32d2e; background: #fef2f2; }
.raq-form__file-tile.is-error .raq-form__file-name { color: #991b1b; }

.raq-form__file-progress {
	height: 3px; width: 100%;
	background: #e5e7eb;
	overflow: hidden;
	display: none;
}
.raq-form__file-progress-bar {
	height: 100%; width: 0%;
	background: #2271b1;
	transition: width .15s ease;
}
.raq-form.is-submitting .raq-form__file-progress { display: block; }
