﻿/* Estimate page. Layout and components are Bootstrap. This file only holds what Bootstrap has no component for:
   the searchable country / state / city / ZIP pickers (their markup and state classes come from database-page.js),
   brand icons for the sample records, and the blurred "more rows" gate. */

/* Keep the mobile category shortcuts compact; the remaining categories appear from md up. */
@media (max-width:767.98px){.estimate-category{font-size:.75rem;padding:.2rem .5rem;}}

/* Pickers */
.quick-country-select,.quick-picker,.quick-region-select{position:relative;}
.quick-region-native{display:none;}
.quick-country-button,.quick-picker-button{display:flex;align-items:center;gap:.6rem;text-align:left;cursor:pointer;}
.quick-picker-button:disabled,.quick-region-select.is-disabled .quick-picker-button{cursor:not-allowed;background-color:var(--bs-tertiary-bg);color:var(--bs-secondary-color);}
.quick-country-current{display:flex;align-items:center;gap:.6rem;min-width:0;}
.quick-country-flag{width:22px;height:16px;object-fit:cover;border:1px solid var(--bs-border-color);border-radius:3px;box-shadow:0 1px 2px rgba(15,23,42,.08);}
.quick-country-name,.quick-picker-name,.quick-picker-option-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.quick-caret{display:none;}
.quick-country-button.form-select,.quick-picker-button.form-select{padding-right:2.1rem;background-position:right .7rem center;}
.quick-country-menu,.quick-picker-menu{display:none;position:absolute;top:calc(100% + .35rem);left:0;right:0;z-index:1050;padding:.35rem;border:var(--bs-border-width) solid var(--bs-border-color);border-radius:var(--bs-border-radius-lg);background:var(--bs-body-bg);box-shadow:var(--bs-box-shadow);}
.quick-country-menu{max-height:17.5rem;overflow-y:auto;}
.quick-country-select.is-open .quick-country-menu,.quick-picker.is-open .quick-picker-menu,.quick-region-select.is-open .quick-picker-menu{display:block;}
.quick-picker-options{max-height:13.5rem;overflow-y:auto;padding-right:2px;}
.quick-region-options{max-height:21.75rem;}
/* On the single-row form (xl and up) the ZIP field is only about 200px wide, too narrow for "90001 - Los Angeles, CA". Its list opens wider and to the left (over the city field, not the button). */
@media (min-width:1200px){.quick-picker[data-zip-select] .quick-picker-menu{left:auto;right:0;width:18rem;}}
.quick-picker-status{padding:.4rem .5rem .1rem;font-size:.6875rem;color:var(--bs-secondary-color);}
.quick-picker-option,.quick-country-option{display:flex;align-items:center;gap:.6rem;width:100%;min-height:2.4rem;padding:.5rem .75rem;border:0;border-radius:var(--bs-border-radius);background:transparent;color:var(--bs-body-color);font:inherit;text-align:left;cursor:pointer;}
.quick-picker-option:hover,.quick-country-option:hover{background:var(--bs-tertiary-bg);}
.quick-picker-option[aria-selected="true"],.quick-country-option[aria-selected="true"]{background:var(--bs-primary-bg-subtle);color:var(--bs-primary-text-emphasis);}
.quick-picker-checkmark{width:15px;height:15px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border:1px solid #b7c3d4;border-radius:3px;background:#fff;color:#fff;}
.quick-picker-checkmark::after{content:"";display:none;width:7px;height:4px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);margin-top:-1px;}
.quick-picker-option[aria-selected="true"] .quick-picker-checkmark,.quick-picker-checkmark[data-mixed="true"]{border-color:var(--bs-primary);background:var(--bs-primary);color:#fff;}
.quick-picker-option[aria-selected="true"] .quick-picker-checkmark::after{display:block;}
.quick-picker-checkmark[data-mixed="true"]::after{display:block;width:7px;height:2px;border:0;background:#fff;transform:none;margin:0;}

/* Submit button spinner (database-page.js adds .is-loading) */
.btn.is-loading .spinner-border{display:inline-block!important;}

/* Blurred rows shown below the real sample rows */
.preview-gate{position:relative;min-height:10.5rem;overflow:hidden;border-top:1px solid var(--bs-border-color);}
.preview-gate-blur{filter:blur(5px);opacity:.5;user-select:none;pointer-events:none;}
.preview-gate-row{display:grid;grid-template-columns:16fr 11fr 10fr 13fr 14fr;gap:1.5rem;align-items:center;height:3.6rem;padding:0 1.1rem;border-bottom:1px solid var(--bs-border-color);}
.preview-gate-row span{height:10px;border-radius:4px;background:#94a3b8;}
.preview-gate-overlay{position:absolute;inset:0;background:linear-gradient(180deg,rgba(255,255,255,.4),rgba(248,251,255,.94));}

/* Brand icons and data signals on sample records (SVG masks, so the colors follow the brand) */
.places-data-stack{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;max-width:13rem;}
.places-data-group{display:inline-flex;align-items:center;gap:.25rem;padding:.15rem .35rem;border-radius:999px;background:var(--bs-tertiary-bg);}
.icon-link{width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;}
.icon-link::before{content:"";width:16px;height:16px;display:block;background:currentColor;-webkit-mask:var(--icon-url) center / contain no-repeat;mask:var(--icon-url) center / contain no-repeat;}
.places-data-badge{display:inline-flex;align-items:center;gap:.2rem;height:20px;padding:0 6px 0 3px;border-radius:999px;border:1px solid #cfd8e5;background:#e9eef5;font-size:9px;font-weight:800;color:#111827;}
.places-data-badge .icon-link{width:15px;height:15px;}
.places-data-badge .icon-link::before{width:14px;height:14px;}
.icon-facebook{--icon-url:url('/images/icons/social/facebook.svg');color:#1877f2;}
.icon-instagram{--icon-url:url('/images/icons/social/instagram.svg');color:#e4405f;}
.icon-linkedin{--icon-url:url('/images/icons/social/linkedin.svg');color:#0a66c2;}
.icon-youtube{--icon-url:url('/images/icons/social/youtube.svg');color:#ff0000;}
.icon-x{--icon-url:url('/images/icons/social/x.svg');color:#111827;}
.icon-yelp{--icon-url:url('/images/icons/social/yelp.svg');color:#d32323;}
.icon-tiktok{--icon-url:url('/images/icons/social/tiktok.svg');color:#111827;}
.icon-website{--icon-url:url('/images/icons/social/website-available.svg');color:#2563eb;}
.icon-email{--icon-url:url('/images/icons/social/email.svg');color:#0f766e;}
.icon-phone{--icon-url:url('/images/icons/social/phone.svg');color:#334155;}
.icon-contact-page{--icon-url:url('/images/icons/social/contact-page.svg');color:#2563eb;}
.icon-settings{--icon-url:url('/images/icons/social/settings.svg');color:#475569;}

/* Search coverage cards under the estimate (Views/Home/Index.cshtml, #estimate-depth): the look of the task builder's cards
   (Web.App quick-task.css, .quick-depth-*), on links instead of radios, so the selected one is .active. Keep the two in step. */
.estimate-depth-option{background:var(--bs-body-bg);transition:border-color .15s,box-shadow .15s;}
.estimate-depth-option:hover{border-color:#9ec2f5!important;}
.estimate-depth-option.active{border-color:var(--bs-primary)!important;background:#f4f8ff;box-shadow:0 0 0 1px rgba(11,99,229,.35);}
.estimate-depth-option:focus-visible{outline:2px solid var(--bs-primary);outline-offset:2px;}
.estimate-depth-icon{display:inline-flex;color:var(--bs-primary);}
.estimate-depth-icon-1{opacity:.45;}
.estimate-depth-icon-2{opacity:.75;}
.estimate-depth-check{display:none;width:1.125rem;height:1.125rem;}
.estimate-depth-option.active .estimate-depth-check{display:flex;}
