/*
 * Orçamento Profissional — Frontend Styles
 * Author: Roi Máximo (roimaximo.top)
 */

/* =========================================================
   VARIÁVEIS — Tema escuro fixo
   ========================================================= */
.op-wrapper {
	--op-bg:            #0f1117;
	--op-surface:       #1a1d27;
	--op-surface-2:     #22263a;
	--op-border:        #2e3348;
	--op-accent:        #4f8ef7;
	--op-accent-2:      #6ee7b7;
	--op-wpp:           #25d366;
	--op-wpp-hover:     #1ebe58;
	--op-danger:        #f87171;
	--op-text:          #e2e8f0;
	--op-text-muted:    #94a3b8;
	--op-placeholder:   #475569;
	--op-input-bg:      #0f1117;
	--op-shadow:        0 8px 40px rgba(0,0,0,.55);
	--op-radius:        14px;
	--op-radius-sm:     8px;
	--op-transition:    .2s ease;

	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--op-text);
	background: transparent;
	width: 100%;
	box-sizing: border-box;
}

.op-wrapper *,
.op-wrapper *::before,
.op-wrapper *::after {
	box-sizing: border-box;
}

/* =========================================================
   FORM CONTAINER
   ========================================================= */
.op-form-container,
.op-result-container {
	background: var(--op-surface);
	border: 1px solid var(--op-border);
	border-radius: var(--op-radius);
	padding: 36px 32px;
	max-width: 760px;
	margin: 0 auto;
	box-shadow: var(--op-shadow);
	position: relative;
	overflow: hidden;
}

.op-form-container::before,
.op-result-container::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--op-accent), var(--op-accent-2));
}

/* =========================================================
   FORM HEADER
   ========================================================= */
.op-form-header {
	text-align: center;
	margin-bottom: 32px;
}

.op-form-header-icon {
	font-size: 40px;
	margin-bottom: 10px;
	display: block;
}

.op-form-title {
	font-size: 24px;
	font-weight: 800;
	color: var(--op-text);
	margin: 0 0 8px !important;
	letter-spacing: -.3px;
}

.op-form-subtitle {
	color: var(--op-text-muted);
	font-size: 14px;
	margin: 0;
}

/* =========================================================
   SECTION LABELS
   ========================================================= */
.op-section-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--op-accent);
	margin: 24px 0 14px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--op-border);
}

/* =========================================================
   GRID
   ========================================================= */
.op-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.op-col-2 {
	grid-column: span 2;
}

/* =========================================================
   FIELDS
   ========================================================= */
.op-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.op-field label {
	font-size: 13px;
	font-weight: 500;
	color: var(--op-text-muted);
}

.op-required {
	color: var(--op-danger);
	margin-left: 2px;
}

.op-field input[type="text"],
.op-field input[type="email"],
.op-field input[type="tel"],
.op-field input[type="number"],
.op-field select,
.op-field textarea {
	background: var(--op-input-bg);
	border: 1px solid var(--op-border);
	border-radius: var(--op-radius-sm);
	color: var(--op-text);
	padding: 11px 14px;
	font-size: 14px;
	width: 100%;
	outline: none;
	transition: border-color var(--op-transition), box-shadow var(--op-transition);
	-webkit-appearance: none;
	appearance: none;
	font-family: inherit;
}

.op-field input::placeholder,
.op-field textarea::placeholder {
	color: var(--op-placeholder);
}

.op-field input:focus,
.op-field select:focus,
.op-field textarea:focus {
	border-color: var(--op-accent);
	box-shadow: 0 0 0 3px rgba(79,142,247,.18);
}

.op-field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 36px;
	cursor: pointer;
}

.op-field select option {
	background: var(--op-surface);
	color: var(--op-text);
}

.op-field textarea {
	resize: vertical;
	min-height: 80px;
}

/* =========================================================
   CONDITIONS GRID
   ========================================================= */
.op-conditions-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 10px;
	margin-bottom: 8px;
}

.op-checkbox-card {
	cursor: pointer;
	display: block;
}

.op-checkbox-card input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.op-checkbox-inner {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--op-input-bg);
	border: 1px solid var(--op-border);
	border-radius: var(--op-radius-sm);
	padding: 10px 14px;
	transition: all var(--op-transition);
}

.op-checkbox-card input:checked + .op-checkbox-inner {
	border-color: var(--op-accent);
	background: var(--op-surface-2);
}

.op-checkbox-inner:hover {
	border-color: var(--op-accent);
}

.op-checkbox-check {
	width: 18px;
	height: 18px;
	border: 2px solid var(--op-border);
	border-radius: 4px;
	flex-shrink: 0;
	transition: all var(--op-transition);
	background: var(--op-surface);
	position: relative;
}

.op-checkbox-card input:checked + .op-checkbox-inner .op-checkbox-check {
	background: var(--op-accent);
	border-color: var(--op-accent);
}

.op-checkbox-card input:checked + .op-checkbox-inner .op-checkbox-check::after {
	content: '';
	position: absolute;
	left: 4px;
	top: 1px;
	width: 5px;
	height: 9px;
	border: 2px solid #fff;
	border-top: none;
	border-left: none;
	transform: rotate(45deg);
}

.op-checkbox-text {
	font-size: 13px;
	color: var(--op-text);
}

/* =========================================================
   PRIVACY
   ========================================================= */
.op-privacy {
	margin-top: 20px;
}

.op-privacy-label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	color: var(--op-text-muted);
	cursor: pointer;
}

.op-privacy-label input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--op-accent);
	cursor: pointer;
	flex-shrink: 0;
}

.op-privacy-label a {
	color: var(--op-accent);
	text-decoration: none;
}

.op-privacy-label a:hover {
	text-decoration: underline;
}

/* =========================================================
   FORM ERROR
   ========================================================= */
.op-form-error {
	border: 1px solid var(--op-danger);
	border-radius: var(--op-radius-sm);
	color: var(--op-danger);
	font-size: 13px;
	padding: 10px 14px;
	margin-top: 12px;
	display: none;
	animation: op-fade-in .2s ease;
}

.op-form-error:not(:empty) {
	display: block;
}

/* =========================================================
   SUBMIT BUTTON
   ========================================================= */
.op-btn-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	background: linear-gradient(135deg, var(--op-accent), #6366f1);
	color: #fff;
	border: none;
	border-radius: var(--op-radius-sm);
	padding: 14px 24px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	margin-top: 20px;
	transition: opacity var(--op-transition), transform var(--op-transition), box-shadow var(--op-transition);
	letter-spacing: .2px;
	font-family: inherit;
}

.op-btn-submit:hover:not(:disabled) {
	opacity: .92;
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(79,142,247,.35);
}

.op-btn-submit:disabled {
	opacity: .6;
	cursor: not-allowed;
}

.op-btn-loader {
	display: none;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255,255,255,.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: op-spin .7s linear infinite;
}

.op-btn-submit.op-loading .op-btn-text   { display: none; }
.op-btn-submit.op-loading .op-btn-loader { display: block; }

/* =========================================================
   RESULT CONTAINER
   ========================================================= */
.op-result-header {
	text-align: center;
	margin-bottom: 24px;
}

.op-result-icon {
	font-size: 48px;
	margin-bottom: 12px;
}

.op-result-title {
	font-size: 22px;
	font-weight: 800;
	color: var(--op-text);
	margin: 0 !important;
}

.op-result-card {
	background: var(--op-surface-2);
	border: 1px solid var(--op-border);
	border-radius: var(--op-radius-sm);
	padding: 24px;
	text-align: center;
	margin-bottom: 20px;
}

.op-result-label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--op-text-muted);
	margin-bottom: 8px;
}

.op-result-value {
	font-size: 42px;
	font-weight: 900;
	color: var(--op-accent-2);
	letter-spacing: -1px;
	line-height: 1;
	margin-bottom: 16px;
}

.op-result-note {
	font-size: 14px;
	color: var(--op-text-muted);
	text-align: center;
	margin: 0 0 16px;
}

.op-btn-whatsapp {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	background: var(--op-wpp);
	color: #fff;
	border: none;
	border-radius: var(--op-radius-sm);
	padding: 14px 24px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	transition: background var(--op-transition), transform var(--op-transition), box-shadow var(--op-transition);
	font-family: inherit;
	margin-bottom: 12px;
}

.op-btn-whatsapp:hover {
	background: var(--op-wpp-hover);
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(37,211,102,.3);
	color: #fff;
}

.op-btn-new {
	display: block;
	width: 100%;
	background: transparent;
	color: var(--op-text-muted);
	border: 1px solid var(--op-border);
	border-radius: var(--op-radius-sm);
	padding: 11px 24px;
	font-size: 14px;
	cursor: pointer;
	transition: all var(--op-transition);
	font-family: inherit;
}

.op-btn-new:hover {
	border-color: var(--op-accent);
	color: var(--op-accent);
}

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes op-spin {
	to { transform: rotate(360deg); }
}

@keyframes op-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 600px) {
	.op-form-container,
	.op-result-container {
		padding: 24px 16px;
	}

	.op-grid-2 {
		grid-template-columns: 1fr;
	}

	.op-col-2 {
		grid-column: span 1;
	}

	.op-conditions-grid {
		grid-template-columns: 1fr;
	}

	.op-form-title {
		font-size: 20px;
	}

	.op-result-value {
		font-size: 34px;
	}
}

@media (min-width: 601px) and (max-width: 900px) {
	.op-form-container,
	.op-result-container {
		padding: 28px 24px;
	}
}
