/* ----------------------------------------------------------------------------------------
* 9M Design Studio - Interior Cost Estimator styles (new design system)
* Uses tokens from inner.css (ink, paper, brass, fonts) and components.css (.sec, .h2, .btn)
* ---------------------------------------------------------------------------------------- */

.page-estimator{ background: var(--paper); }
.estimator-wrap{ max-width: 960px; margin: 0 auto; }

.est-head{ text-align: center; margin-bottom: clamp(36px, 5vw, 60px); }
.est-head .eyebrow{ justify-content: center; }
.est-head .lead{ margin: 22px auto 0; max-width: 62ch; }

/* Progress */
.est-progress{ margin-bottom: 36px; }
.est-progress-meta{
	display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px;
	font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass);
}
.est-progress-meta strong{ font-family: var(--f-display); font-size: 26px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink); }
.est-progress-track{ width: 100%; height: 1px; background: var(--line-dark); position: relative; }
.est-progress-bar{ position: absolute; left: 0; top: -1px; height: 3px; width: 0; background: var(--brass); transition: width .6s var(--ease); }
.est-steps-list{ display: flex; justify-content: space-between; list-style: none; margin: 18px 0 0; padding: 0; gap: 6px; }
.est-steps-list li{
	flex: 1; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
	color: var(--ink); opacity: .4; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.est-steps-list li.is-active{ opacity: 1; color: var(--brass); }
.est-steps-list li.is-done{ opacity: .85; }

/* Card */
.est-card{ background: #fff; border: 1px solid var(--line-dark); padding: clamp(24px, 4vw, 56px); }
.est-resume-notice{
	display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between;
	background: var(--paper); border-left: 2px solid var(--brass); padding: 14px 20px; margin-bottom: 30px; font-size: 14px;
}
.est-resume-notice p{ margin: 0; }
.est-resume-notice[hidden]{ display: none; }
.est-link{
	color: var(--brass); font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
	text-decoration: underline; text-underline-offset: 4px; background: none; border: none; padding: 0; cursor: pointer;
}
.est-link:hover{ color: var(--ink); }

/* Steps */
.est-step{ display: none; }
.est-step.is-active{ display: block; animation: estFade .5s var(--ease); }
@keyframes estFade{ from{ opacity: 0; transform: translateY(12px); } to{ opacity: 1; transform: none; } }
.est-step fieldset{ border: none; padding: 0; margin: 0 0 40px; min-width: 0; }
.est-step fieldset:last-of-type{ margin-bottom: 0; }
.est-step legend, .est-label{
	display: block; width: 100%; padding: 0; margin-bottom: 8px;
	font-family: var(--f-display); font-size: clamp(26px, 2.6vw, 36px); font-weight: 500; line-height: 1.1; color: var(--ink); float: none;
}
.est-hint{ font-size: 15px; line-height: 1.6; color: rgba(12,29,24,.65); margin: 0 0 22px; }

/* Option tiles */
.est-options{ display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.est-options.est-options-wide{ grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.est-option{ position: relative; display: block; margin: 0; cursor: pointer; }
.est-option input{ position: absolute; opacity: 0; width: 1px; height: 1px; overflow: hidden; }
.est-option-box{
	display: flex; flex-direction: column; align-items: flex-start; gap: 6px; height: 100%;
	border: 1px solid var(--line-dark); background: #fff; padding: 20px;
	transition: background .4s var(--ease), border-color .4s, color .4s, transform .4s var(--ease);
}
.est-option-box i{ font-size: 20px; color: var(--brass); margin-bottom: 6px; transition: color .3s; }
.est-option-box strong{ font-family: var(--f-display); font-size: 22px; font-weight: 600; line-height: 1.15; color: var(--ink); }
.est-option-box small{ font-size: 13.5px; line-height: 1.5; color: rgba(12,29,24,.7); }
.est-option:hover .est-option-box{ border-color: var(--brass); transform: translateY(-3px); }
.est-option input:focus-visible + .est-option-box{ outline: 2px solid var(--brass); outline-offset: 2px; }
.est-option input:checked + .est-option-box{ background: var(--ink); border-color: var(--ink); }
.est-option input:checked + .est-option-box strong{ color: var(--paper); }
.est-option input:checked + .est-option-box small{ color: rgba(244,240,231,.8); }
.est-option input:checked + .est-option-box i{ color: var(--brass-soft); }

/* Package cards */
.est-package .est-option-box{ padding: 26px; }
.est-package .est-option-box ul{ list-style: none; margin: 14px 0 0; padding: 0; }
.est-package .est-option-box ul li{ position: relative; font-size: 13.5px; line-height: 1.5; padding-left: 22px; margin-bottom: 6px; color: rgba(12,29,24,.8); }
.est-package .est-option-box ul li::before{ content: ''; position: absolute; left: 0; top: .72em; width: 12px; height: 1px; background: var(--brass); }
.est-package input:checked + .est-option-box ul li{ color: rgba(244,240,231,.85); }
.est-package .est-tag{
	display: inline-block; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
	color: var(--brass); border: 1px solid var(--brass); padding: 3px 9px; margin-bottom: 8px;
}
.est-package input:checked + .est-option-box .est-tag{ color: var(--brass-soft); border-color: var(--brass-soft); }

/* Form layout + inputs */
.est-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 4px; }
.est-col{ min-width: 0; }
.est-col.est-full{ grid-column: 1 / -1; }
.est-form .form-control, .est-form .form-select{
	display: block; width: 100%; font-family: var(--f-body); font-size: 16px; line-height: 1.3; color: var(--ink);
	background-color: #fff; border: 1px solid var(--line-dark); border-radius: 0; outline: none; box-shadow: none;
	padding: 15px 16px; height: auto; transition: border-color .3s;
}
.est-form .form-control::placeholder{ color: rgba(12,29,24,.4); }
.est-form .form-control:focus, .est-form .form-select:focus{ border-color: var(--brass); box-shadow: none; }
.est-form .form-control.is-invalid, .est-form .form-select.is-invalid{ border-color: #b3433f; background-image: none; }
.est-field-label{ display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); margin-bottom: 8px; }
.est-input-suffix{ position: relative; }
.est-input-suffix span{ position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--brass); pointer-events: none; }
.est-input-suffix .form-control{ padding-right: 70px; }

/* Room rows */
.est-rooms{ display: flex; flex-direction: column; gap: 12px; }
.est-room{
	display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center;
	border: 1px solid var(--line-dark); padding: 18px 22px; background: #fff; transition: border-color .3s, background .3s;
}
.est-room.is-on{ border-color: var(--brass); background: var(--paper); }
.est-room-check{ display: flex; align-items: center; gap: 16px; cursor: pointer; margin: 0; }
.est-room-check input{ width: 18px; height: 18px; accent-color: var(--brass); margin: 0; flex-shrink: 0; }
.est-room-check strong{ display: block; font-family: var(--f-display); font-size: 22px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.est-room-check strong i{ color: var(--brass); font-size: 16px; }
.est-room-check small{ display: block; font-size: 13.5px; color: rgba(12,29,24,.65); margin-top: 2px; }
.est-room-controls{ display: contents; }
.est-room:not(.is-on) .est-counter, .est-room:not(.is-on) .est-scope{ visibility: hidden; }
.est-counter{ display: inline-flex; align-items: center; border: 1px solid var(--line-dark); background: #fff; }
.est-counter button{ width: 38px; height: 40px; background: transparent; border: none; color: var(--ink); font-size: 16px; cursor: pointer; transition: background .3s, color .3s; }
.est-counter button:hover{ background: var(--brass); color: var(--ink); }
.est-counter button:disabled{ opacity: .3; cursor: not-allowed; background: transparent; }
.est-counter output{ min-width: 36px; text-align: center; font-family: var(--f-mono); font-size: 14px; }
.est-scope{ display: inline-flex; border: 1px solid var(--line-dark); background: #fff; }
.est-scope label{ margin: 0; cursor: pointer; }
.est-scope input{ position: absolute; opacity: 0; width: 1px; height: 1px; }
.est-scope span{ display: block; padding: 11px 16px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); transition: background .3s, color .3s; white-space: nowrap; }
.est-scope input:checked + span{ background: var(--ink); color: var(--paper); }
.est-scope input:focus-visible + span{ outline: 2px solid var(--brass); outline-offset: -2px; }

/* Errors */
.est-error{ display: none; background: #fbeeed; border-left: 2px solid #b3433f; color: #8f2f2b; font-size: 14px; padding: 14px 18px; margin-bottom: 26px; }
.est-error.is-visible{ display: block; }
.est-error ul{ margin: 0; padding-left: 18px; }
.est-field-error{ display: none; color: #b3433f; font-size: 13px; margin-top: 6px; }
.est-field-error.is-visible{ display: block; }

/* Navigation */
.est-nav{ display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--line-dark); }
.est-nav[hidden]{ display: none; }
.est-nav .btn{ cursor: pointer; }
.est-nav .btn:disabled{ opacity: .55; cursor: not-allowed; }
#estNext::after{ content: ''; width: 22px; height: 1px; background: currentColor; display: inline-block; margin-left: 14px; vertical-align: middle; }
.btn-back{
	display: inline-flex; align-items: center; gap: 10px; background: transparent; border: none; padding: 0; cursor: pointer;
	font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); transition: color .3s;
}
.btn-back:hover{ color: var(--brass); }
.btn-back[hidden]{ display: none; }

/* Review (contact step) */
.est-badge{
	display: inline-block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
	color: var(--brass); border: 1px solid var(--brass); padding: 5px 12px; margin-bottom: 18px;
}
.est-review{ text-align: center; background: var(--paper); border: 1px solid var(--line-dark); padding: 30px 22px 22px; margin-bottom: 40px; }
.est-review p{ margin: 0; }
.est-summary-chips{ display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.est-summary-chips span{ font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; background: #fff; border: 1px solid var(--line-dark); color: var(--ink); padding: 8px 12px; }
.est-result-sub{ font-size: 14px; color: rgba(12,29,24,.65); margin: 16px 0 0; }

/* Consent */
.est-consent{ display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.55; cursor: pointer; margin: 0; }
.est-consent input{ width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--brass); }

/* Confirmation */
.est-done{ text-align: center; padding: 20px 0; }
.est-done[hidden]{ display: none; }
.est-done .icon-box{ width: 72px; height: 72px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--brass); color: var(--brass); font-size: 26px; margin-bottom: 26px; }
.est-done h2{ font-family: var(--f-display); font-size: clamp(32px, 4vw, 52px); font-weight: 500; line-height: 1.05; margin-bottom: 18px; }
.est-done h2 span{ color: var(--brass); font-style: italic; }
.est-done p{ max-width: 540px; margin: 0 auto 25px; line-height: 1.7; }
.est-done p[hidden]{ display: none; }
.est-done .est-lead-id{ display: inline-block; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); border: 1px dashed var(--brass); padding: 7px 14px; margin-bottom: 26px; }
.est-done-actions{ display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; }
.btn-whatsapp:hover{ color: var(--ink); }
.est-done-steps{ text-align: left; max-width: 540px; margin: 40px auto 0; padding-top: 30px; border-top: 1px solid var(--line-dark); }
.est-done-steps h4{ font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); margin-bottom: 14px; }
.est-done-steps ol{ padding-left: 20px; margin: 0; font-size: 15.5px; }
.est-done-steps ol li{ margin-bottom: 8px; padding-left: 4px; }
.est-done-steps ol li::marker{ color: var(--brass); font-family: var(--f-mono); }

.sr-only-est{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Responsive */
@media (max-width: 767px){
	.est-steps-list{ display: none; }
	.est-grid{ grid-template-columns: 1fr; gap: 20px; }
	.est-options{ grid-template-columns: repeat(2, 1fr); gap: 10px; }
	.est-options.est-options-wide{ grid-template-columns: 1fr; }
	.est-option-box{ padding: 16px; }
	.est-room{ grid-template-columns: 1fr; gap: 12px; }
	.est-room-controls{ display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
	.est-room:not(.is-on) .est-room-controls{ display: none; }
	.est-nav{ flex-direction: column-reverse; align-items: stretch; }
	.est-nav .btn{ justify-content: center; }
	.btn-back{ justify-content: center; }
}
