/* DECOBUG Service Portal – front end
 * Inherits the theme's fonts. Colours: leaf (brand), soil, sage, stone, ink.
 */
.dcb-scope {
	--dcb-leaf: #2f5d3a;
	--dcb-soil: #7a5c3e;
	--dcb-sage: #eef3ec;
	--dcb-stone: #d6ddd2;
	--dcb-ink: #1f2a22;
	--dcb-muted: #5f6b62;
	--dcb-danger: #a23b2a;
	--dcb-radius: 10px;
	color: var(--dcb-ink);
	line-height: 1.55;
	max-width: 880px;
}
.dcb-scope *, .dcb-scope *::before, .dcb-scope *::after { box-sizing: border-box; }
.dcb-scope h2, .dcb-scope h3, .dcb-scope h4 { margin: 0 0 .5em; line-height: 1.25; }
.dcb-scope .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.dcb-help { color: var(--dcb-muted); font-size: .92em; margin: .25em 0 1em; }
.dcb-sep { margin: 0 .5em; color: var(--dcb-stone); }
.dcb-hp { position: absolute; left: -9999px; }

/* Buttons & focus */
.dcb-btn {
	display: inline-block; padding: .75em 1.3em; border-radius: 999px; border: 2px solid var(--dcb-leaf);
	background: transparent; color: var(--dcb-leaf); font: inherit; font-weight: 600; text-decoration: none;
	cursor: pointer; line-height: 1.2;
}
.dcb-btn:hover { background: var(--dcb-sage); }
.dcb-btn--primary { background: var(--dcb-leaf); color: #fff; }
.dcb-btn--primary:hover { background: var(--dcb-leaf); filter: brightness(1.1); }
.dcb-btn[disabled] { opacity: .6; cursor: progress; }
.dcb-scope :focus-visible { outline: 3px solid var(--dcb-soil); outline-offset: 2px; }

/* Notices */
.dcb-notice { padding: .9em 1.1em; border-radius: var(--dcb-radius); margin: 0 0 1.25em; border-left: 4px solid; background: var(--dcb-sage); }
.dcb-notice--success { border-color: var(--dcb-leaf); }
.dcb-notice--info { border-color: var(--dcb-soil); background: #f6f1ea; }
.dcb-notice--error { border-color: var(--dcb-danger); background: #fbeeec; color: #6d2418; }

/* ---------- Request form ---------- */
.dcb-form { display: grid; gap: 2rem; }
.dcb-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.dcb-step legend { font-size: 1.3em; font-weight: 700; margin-bottom: .4em; padding: 0; display: flex; align-items: center; gap: .6em; }
.dcb-step__num {
	display: inline-grid; place-items: center; width: 1.8em; height: 1.8em; border-radius: 50%;
	background: var(--dcb-leaf); color: #fff; font-size: .8em;
}

.dcb-services { display: grid; gap: .75rem; }
.dcb-service { border: 2px solid var(--dcb-stone); border-radius: var(--dcb-radius); background: #fff; }
.dcb-service.is-selected { border-color: var(--dcb-leaf); }
.dcb-service__head { display: flex; align-items: center; gap: .9em; padding: 1em 1.1em; cursor: pointer; }
.dcb-service__head input { width: 1.25em; height: 1.25em; accent-color: var(--dcb-leaf); flex: none; }
.dcb-service__icon { font-size: 1.7em; line-height: 1; }
.dcb-service__text { display: flex; flex-direction: column; }
.dcb-service__text small { color: var(--dcb-muted); }
.dcb-service__fields {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem 1.25rem;
	padding: 1.1em; border-top: 1px dashed var(--dcb-stone); background: var(--dcb-sage);
	border-radius: 0 0 calc(var(--dcb-radius) - 2px) calc(var(--dcb-radius) - 2px);
}
.dcb-service__fields[hidden] { display: none; }

.dcb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem 1.25rem; margin-bottom: 1rem; }
.dcb-field { display: flex; flex-direction: column; gap: .35em; margin-bottom: 1rem; min-width: 0; }
.dcb-grid .dcb-field, .dcb-service__fields .dcb-field { margin-bottom: 0; }
.dcb-field > label, .dcb-label { font-weight: 600; font-size: .95em; }
.dcb-req { color: var(--dcb-danger); }
.dcb-scope input[type="text"], .dcb-scope input[type="email"], .dcb-scope input[type="tel"],
.dcb-scope input[type="number"], .dcb-scope input[type="password"], .dcb-scope select, .dcb-scope textarea {
	width: 100%; padding: .65em .8em; border: 1px solid #b9c3b5; border-radius: 6px; background: #fff; font: inherit; color: inherit;
}
.dcb-scope input[type="file"] { font: inherit; }
.dcb-checks { display: flex; flex-wrap: wrap; gap: .4em .5em; }
.dcb-check { display: inline-flex; align-items: flex-start; gap: .45em; cursor: pointer; }
.dcb-checks .dcb-check { align-items: center; background: #fff; border: 1px solid var(--dcb-stone); border-radius: 999px; padding: .3em .8em .3em .6em; font-size: .93em; }
.dcb-checks .dcb-check input { margin: 0; }
.dcb-checks .dcb-check:has(input:checked) { border-color: var(--dcb-leaf); background: #e2ecdf; }
.dcb-check input { accent-color: var(--dcb-leaf); margin-top: .3em; }
.dcb-consent { margin-top: .5em; font-size: .93em; }
.dcb-form > .dcb-btn { justify-self: start; font-size: 1.05em; }

.dcb-success { padding: 2em; border-radius: var(--dcb-radius); background: var(--dcb-sage); border-left: 5px solid var(--dcb-leaf); }

/* ---------- Portal ---------- */
.dcb-card { background: #fff; border: 1px solid var(--dcb-stone); border-radius: var(--dcb-radius); padding: 1.4em 1.5em; margin-bottom: 1.25rem; }
.dcb-card--attention { border: 2px solid var(--dcb-leaf); }
.dcb-card h3 .dcb-help { font-weight: 400; font-size: .7em; margin-left: .5em; }
.dcb-collapsible > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.dcb-collapsible > summary::-webkit-details-marker { display: none; }
.dcb-collapsible > summary::after { content: "+"; font-size: 1.4em; color: var(--dcb-muted); }
.dcb-collapsible[open] > summary::after { content: "−"; }
.dcb-collapsible > summary h3 { margin: 0; }
.dcb-collapsible[open] > summary { margin-bottom: 1em; }

.dcb-login { max-width: 460px; }
.dcb-login form p { margin: 0 0 1em; }
.dcb-login label { display: block; font-weight: 600; margin-bottom: .3em; }
.dcb-login .login-remember label { font-weight: 400; }
.dcb-login input[type="submit"] {
	padding: .75em 1.5em; border-radius: 999px; border: 0; background: var(--dcb-leaf); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}

.dcb-portal__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.5rem; }
.dcb-portal__head h2 { margin: 0; }
.dcb-empty { padding: 2em; text-align: center; border: 2px dashed var(--dcb-stone); border-radius: var(--dcb-radius); }

.dcb-jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.dcb-job__link {
	display: grid; grid-template-columns: 1fr auto; gap: .3em 1em; padding: 1.1em 1.25em; border: 1px solid var(--dcb-stone);
	border-radius: var(--dcb-radius); text-decoration: none; color: inherit; background: #fff;
}
.dcb-job__link:hover { border-color: var(--dcb-leaf); }
.dcb-job__title { font-weight: 700; font-size: 1.08em; }
.dcb-job__meta { color: var(--dcb-muted); font-size: .9em; }
.dcb-job__action { grid-column: 1 / -1; color: var(--dcb-soil); font-weight: 600; font-size: .95em; }
.dcb-job__link .dcb-bar { grid-column: 1 / -1; margin-top: .4em; }

.dcb-badge { display: inline-block; padding: .2em .7em; border-radius: 999px; font-size: .8em; font-weight: 600; background: #e7ebe5; color: var(--dcb-ink); white-space: nowrap; vertical-align: middle; }
.dcb-badge--new { background: #e8eef7; color: #264a7a; }
.dcb-badge--quoted { background: #fbf0dc; color: #7a5210; }
.dcb-badge--accepted, .dcb-badge--scheduled { background: #e2ecdf; color: #2f5d3a; }
.dcb-badge--in_progress { background: #2f5d3a; color: #fff; }
.dcb-badge--completed, .dcb-badge--handed_over { background: #7a5c3e; color: #fff; }
.dcb-badge--declined, .dcb-badge--cancelled { background: #f1e3e0; color: #6d2418; }

.dcb-bar { display: block; height: 6px; border-radius: 3px; background: var(--dcb-sage); overflow: hidden; margin-bottom: 1em; }
.dcb-bar > span { display: block; height: 100%; background: var(--dcb-leaf); border-radius: 3px; }

.dcb-back { text-decoration: none; font-weight: 600; }
.dcb-project-head { margin-bottom: 1.5rem; }
.dcb-project-head h2 { margin-bottom: .2em; }

/* Stepper: a stem that grows from requested to handed over */
.dcb-stepper { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); }
.dcb-stepper li { position: relative; text-align: center; padding-top: 30px; font-size: .82em; color: var(--dcb-muted); }
.dcb-stepper li::before {
	content: ""; position: absolute; top: 4px; left: 50%; width: 18px; height: 18px; margin-left: -9px;
	border-radius: 50% 0; transform: rotate(45deg); background: #fff; border: 2px solid var(--dcb-stone); z-index: 1;
}
.dcb-stepper li:not(:last-child)::after {
	content: ""; position: absolute; top: 12px; left: 50%; width: 100%; height: 3px; background: var(--dcb-stone);
}
.dcb-stepper li.is-done::before, .dcb-stepper li.is-current::before { background: var(--dcb-leaf); border-color: var(--dcb-leaf); }
.dcb-stepper li.is-done::after { background: var(--dcb-leaf); }
.dcb-stepper li.is-current { color: var(--dcb-ink); font-weight: 700; }
.dcb-stepper li.is-current::before { width: 24px; height: 24px; margin-left: -12px; top: 1px; box-shadow: 0 0 0 5px var(--dcb-sage); }

@media (max-width: 640px) {
	.dcb-stepper { grid-template-columns: 1fr; }
	.dcb-stepper li { text-align: left; padding: 0 0 1.1em 2.4em; }
	.dcb-stepper li::before { left: 4px; top: 2px; margin-left: 0; }
	.dcb-stepper li.is-current::before { left: 1px; top: 0; margin-left: 0; }
	.dcb-stepper li:not(:last-child)::after { top: 12px; left: 12px; width: 3px; height: 100%; }
}

/* Quote */
.dcb-table-wrap { overflow-x: auto; margin-bottom: 1em; }
.dcb-quote-table { min-width: 440px; }
.dcb-quote-table th { font-size: .85em; color: var(--dcb-muted); font-weight: 600; }
.dcb-quote-total td { font-size: 1.1em; border-bottom: 0 !important; }
.dcb-inline-form { margin-top: 1.25em; }
.dcb-decline { margin-top: 1em; }
.dcb-decline summary { cursor: pointer; color: var(--dcb-muted); }
.dcb-decline form { margin-top: 1em; }

/* Tasks */
.dcb-tasks { list-style: none; margin: 0; padding: 0; }
.dcb-tasks li { display: flex; align-items: center; gap: .75em; padding: .55em 0; border-bottom: 1px solid var(--dcb-sage); }
.dcb-tasks li:last-child { border-bottom: 0; }
.dcb-tasks li small { margin-left: auto; color: var(--dcb-muted); }
.dcb-tasks__mark { flex: none; width: 1.4em; height: 1.4em; border-radius: 50%; border: 2px solid var(--dcb-stone); display: grid; place-items: center; font-size: .8em; color: #fff; }
.dcb-tasks li.is-done .dcb-tasks__mark { background: var(--dcb-leaf); border-color: var(--dcb-leaf); }
.dcb-tasks li.is-done > span:nth-child(2) { color: var(--dcb-muted); }

/* Timeline */
.dcb-timeline { list-style: none; margin: 0; padding: 0 0 0 1.25em; border-left: 3px solid var(--dcb-sage); }
.dcb-timeline li { position: relative; padding: 0 0 1.5em .5em; }
.dcb-timeline li::before { content: ""; position: absolute; left: calc(-1.25em - 8px); top: .35em; width: 13px; height: 13px; border-radius: 50%; background: var(--dcb-leaf); border: 3px solid #fff; }
.dcb-timeline time { font-size: .85em; color: var(--dcb-muted); }
.dcb-timeline h4 { margin: .15em 0 .35em; }

.dcb-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .5em; margin: .75em 0; }
.dcb-photos a { display: block; border-radius: 6px; overflow: hidden; aspect-ratio: 1; background: var(--dcb-sage); }
.dcb-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }

.dcb-dl { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: .3em 1.25em; margin: 0 0 1em; }
.dcb-dl dt { color: var(--dcb-muted); }
.dcb-dl dd { margin: 0; }
.dcb-summary-service h4 { color: var(--dcb-leaf); }

/* Rating */
.dcb-rating { border: 0; padding: 0; margin: 0 0 1em; }
.dcb-rating legend { font-weight: 600; margin-bottom: .3em; padding: 0; }
.dcb-rating__stars { display: inline-flex; flex-direction: row-reverse; gap: .1em; }
.dcb-rating__stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dcb-rating__stars label { font-size: 2.2em; line-height: 1; color: var(--dcb-stone); cursor: pointer; }
.dcb-rating__stars label:hover, .dcb-rating__stars label:hover ~ label,
.dcb-rating__stars input:checked ~ label { color: #d99a1e; }
.dcb-rating__stars input:focus-visible + label { outline: 3px solid var(--dcb-soil); outline-offset: 2px; border-radius: 4px; }
.dcb-stars { color: #d99a1e; letter-spacing: .05em; }
.dcb-stars__off { color: var(--dcb-stone); }

.dcb-contact { display: flex; flex-wrap: wrap; align-items: center; gap: .75em; padding: 1.25em 1.5em; background: var(--dcb-sage); border-radius: var(--dcb-radius); }
.dcb-contact p { margin: 0 auto 0 0; font-weight: 600; }

/* Testimonials */
.dcb-testimonials { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.dcb-testimonial { padding: 1.4em; border-radius: var(--dcb-radius); background: var(--dcb-sage); }
.dcb-testimonial blockquote { margin: .6em 0; padding: 0; border: 0; font-size: 1.02em; }
.dcb-testimonial__who { margin: 0; font-weight: 600; }
.dcb-testimonial__who small { font-weight: 400; color: var(--dcb-muted); }

@media (prefers-reduced-motion: no-preference) {
	.dcb-bar > span { transition: width .6s ease; }
}

/* ---------- Portal navigation & sign-in ---------- */
.dcb-nav {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1.5rem;
	padding: .6rem .6rem .6rem 1rem; margin-bottom: 1.75rem; border-radius: var(--dcb-radius); background: var(--dcb-sage);
}
.dcb-nav__links { display: flex; flex-wrap: wrap; gap: .25rem; }
.dcb-nav__links a { padding: .45em .9em; border-radius: 999px; text-decoration: none; color: var(--dcb-ink); font-weight: 600; font-size: .95em; }
.dcb-nav__links a:hover { background: #fff; }
.dcb-nav__links a.is-active { background: var(--dcb-leaf); color: #fff; }
.dcb-nav__out { display: flex; align-items: center; gap: .75em; margin: 0; }
.dcb-nav__who { color: var(--dcb-muted); font-size: .92em; }
.dcb-linkbtn { background: none; border: 0; padding: .45em .9em; font: inherit; font-weight: 600; font-size: .95em; color: var(--dcb-soil); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.dcb-auth { display: flex; justify-content: flex-start; padding: .5rem 0 2rem; }
.dcb-auth .dcb-card { width: 100%; max-width: 440px; padding: 2em; border-top: 5px solid var(--dcb-leaf); }
.dcb-auth h2 { margin-bottom: .25em; }
.dcb-auth__form .dcb-check { margin: .25em 0 1.25em; font-size: .95em; }
.dcb-btn--block { display: block; width: 100%; text-align: center; }
.dcb-auth__links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5em 1em; margin: 1.25em 0 0; font-size: .92em; }

.dcb-pass { position: relative; }
.dcb-pass input { padding-right: 4.5em !important; }
.dcb-pass__toggle {
	position: absolute; top: 50%; right: .4em; transform: translateY(-50%);
	background: none; border: 0; padding: .35em .6em; font: inherit; font-size: .85em; font-weight: 600; color: var(--dcb-leaf); cursor: pointer; border-radius: 4px;
}
.dcb-pass__toggle:hover { background: var(--dcb-sage); }

@media (max-width: 640px) {
	.dcb-nav__out { width: 100%; justify-content: space-between; border-top: 1px solid var(--dcb-stone); padding-top: .5rem; }
}

/* ---------- Materials on the request form ---------- */
.dcb-field--wide { grid-column: 1 / -1; }
.dcb-field--wide .dcb-help { margin: 0 0 .4em; }
.dcb-materials { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.dcb-material { position: relative; display: flex; flex-direction: column; border: 2px solid var(--dcb-stone); border-radius: 8px; background: #fff; cursor: pointer; overflow: hidden; }
.dcb-material:has(input:checked) { border-color: var(--dcb-leaf); box-shadow: 0 0 0 3px #e2ecdf; }
.dcb-material input { position: absolute; top: .5em; left: .5em; width: 1.2em; height: 1.2em; accent-color: var(--dcb-leaf); z-index: 1; }
.dcb-material__img { aspect-ratio: 4 / 3; background: var(--dcb-sage); }
.dcb-material__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dcb-material__text { padding: .5em .65em .65em; display: flex; flex-direction: column; gap: .15em; font-size: .9em; line-height: 1.3; }
.dcb-material__text small { color: var(--dcb-muted); }

/* ---------- Quote options in the portal ---------- */
.dcb-quote-builder h4 { margin-top: 1rem; }
.dcb-quote-table .dcb-num { text-align: right; white-space: nowrap; }
.dcb-quote-builder .dcb-quote-table td, .dcb-quote-builder .dcb-quote-table th { padding: .55em .5em; border-bottom: 1px solid var(--dcb-sage); }
.dcb-choice-group { border: 0; padding: 0; margin: 1.5rem 0 0; min-width: 0; }
.dcb-choice-group legend { font-weight: 700; font-size: 1.05em; margin-bottom: .6em; padding: 0; }
.dcb-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.dcb-option { position: relative; display: flex; flex-direction: column; border: 2px solid var(--dcb-stone); border-radius: var(--dcb-radius); background: #fff; cursor: pointer; overflow: hidden; }
.dcb-option.is-selected { border-color: var(--dcb-leaf); box-shadow: 0 0 0 3px #e2ecdf; }
.dcb-option input { position: absolute; top: .6em; left: .6em; width: 1.3em; height: 1.3em; accent-color: var(--dcb-leaf); z-index: 1; }
.dcb-option__media { aspect-ratio: 16 / 9; background: var(--dcb-sage); }
.dcb-option__media:empty { aspect-ratio: auto; height: 2.4em; }
.dcb-option__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dcb-option__body { display: flex; flex-direction: column; gap: .25em; padding: .7em .85em .85em; }
.dcb-option__body small { color: var(--dcb-muted); line-height: 1.35; }
.dcb-option__price { font-size: .92em; margin-top: auto; padding-top: .3em; }
.dcb-option__tag { position: absolute; top: .55em; right: .55em; background: var(--dcb-soil); color: #fff; font-size: .72em; font-weight: 700; padding: .2em .6em; border-radius: 999px; }
.dcb-quote-sum { margin: 1.5rem 0 1rem; padding: 1em 1.2em; border-radius: var(--dcb-radius); background: var(--dcb-sage); display: grid; gap: .3em; }
.dcb-quote-sum div { display: flex; justify-content: space-between; gap: 1em; }
.dcb-quote-sum__total { font-size: 1.25em; font-weight: 700; padding-top: .35em; border-top: 1px solid var(--dcb-stone); margin-top: .2em; }
.dcb-sms-opt { margin: .25em 0 1.25em; }
