/* ask-your-town.css: the neighbor pages of Ask Your Town (/ask, /ask/my).
   Buttons use the global tv-btn pill system (tv-buttons.css). Light mode only. */

.ayt {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
    color: #0B2D39;
}

.ayt-hero { margin-bottom: 1.5rem; }

/* /ask: the way back to a neighbor's requests, above the form. */
.ayt-mine { display: flex; justify-content: flex-end; margin-bottom: 0.75rem; }

/* Title on the left, the page's main action on the right; stacks on narrow screens. */
.ayt-hero--with-action {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.ayt-eyebrow {
    margin: 0 0 0.3rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #C96E4A;
    font-weight: 600;
}

.ayt-eyebrow a { color: inherit; text-decoration: none; }

.ayt-title {
    margin: 0 0 0.5rem;
    font-family: Georgia, serif;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    line-height: 1.2;
}

.ayt-lead { margin: 0; font-size: 1.05rem; line-height: 1.55; color: #3d5560; }

.ayt-card {
    background: #ffffff;
    border: 1px solid #e5e0d4;
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 16px rgba(11, 45, 57, 0.06);
}

.ayt-card__title { margin: 0 0 0.75rem; font-size: 1.25rem; font-family: Georgia, serif; }

/* /ask/requests: heads the listing cards that follow the request list. */
.ayt-section-title { margin: 2rem 0 0.75rem; font-size: 1.25rem; font-family: Georgia, serif; color: #0B2D39; }

.ayt-label { display: block; margin: 0 0 0.35rem; font-weight: 600; font-size: 0.95rem; }

.ayt-input,
.ayt-textarea {
    width: 100%;
    border: 1px solid #cfc8b8;
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    font-size: 1rem;
    background: #fff;
    color: #0B2D39;
}

.ayt-textarea { resize: vertical; min-height: 140px; line-height: 1.5; }

.ayt-input:focus,
.ayt-textarea:focus { outline: 2px solid #F4B400; outline-offset: 1px; border-color: #F4B400; }

.ayt-input--code { max-width: 10rem; font-family: monospace; font-size: 1.4rem; letter-spacing: 0.3em; }

.ayt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.ayt-fieldset { border: 0; padding: 0; margin: 1rem 0; }

.ayt-choice { display: flex; align-items: center; gap: 0.5rem; margin: 0.35rem 0; cursor: pointer; }

/* The input and ONE text element: bare text plus a link would become separate flex items. */
.ayt-choice input { flex: none; margin-top: 0.2rem; }

.ayt-choice--box {
    background: #F5F2E7;
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    margin: 1rem 0;
    align-items: flex-start;
}

.ayt-more { margin: 1rem 0; }
.ayt-more summary { cursor: pointer; font-weight: 600; color: #0B2D39; }

.ayt-hint { margin: 0.4rem 0 0; font-size: 0.88rem; color: #5b6b72; }

.ayt-warning,
.ayt-banner {
    margin: 0.75rem 0;
    padding: 0.75rem 0.9rem;
    border-left: 4px solid #F4B400;
    background: #FBF9F1;
    border-radius: 8px;
    font-size: 0.95rem;
}

.ayt-error { margin: 0.75rem 0 0; color: #a23b1d; font-weight: 600; }
.ayt-error__link { color: inherit; text-decoration: underline; text-underline-offset: 3px; margin-right: 0.6rem; }

.ayt-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }

.ayt-question { margin: 1rem 0; }

.ayt-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.ayt-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #cfc8b8;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    cursor: pointer;
    font-size: 0.92rem;
}

.ayt-chip input { accent-color: #0B2D39; }
.ayt-chip:has(input:checked) { background: #0B2D39; color: #F5F2E7; border-color: #0B2D39; }

.ayt-code { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1rem 0; }

.ayt-request-text { white-space: pre-line; line-height: 1.6; margin: 0.75rem 0 0; }

.ayt-footnote { text-align: center; font-size: 0.92rem; }
.ayt-footnote a { color: #0B2D39; }

.ayt-list { list-style: none; padding: 0; margin: 1.25rem 0 0; }

.ayt-list__item { margin-bottom: 0.75rem; }

.ayt-list__link {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.75rem;
    align-items: center;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid #e5e0d4;
    border-radius: 12px;
    color: #0B2D39;
    text-decoration: none;
}

.ayt-list__link:hover { border-color: #0B2D39; }
.ayt-list__summary { font-weight: 600; }
.ayt-list__meta { grid-column: 2; font-size: 0.85rem; color: #5b6b72; }

.ayt-status {
    grid-row: span 2;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    background: #F5F2E7;
}

.ayt-status--open { background: #8FAE91; color: #fff; }
.ayt-status--pending_review { background: #F4B400; color: #0B2D39; }
.ayt-status--closed { background: #e5e0d4; color: #3d5560; }

/* Business reply page (/ask/requests/{id}) */
.ayt-label--spaced { margin-top: 0.9rem; }
.ayt-input--inline { width: auto; min-width: 12rem; }
.ayt-quote { margin: 0.75rem 0 0; font-weight: 600; }
.ayt-status { display: inline-block; margin: 0 0 0.5rem; }

.ayt-coach {
    margin: 1rem 0;
    padding: 1rem 1.1rem;
    border: 1px dashed #8FAE91;
    border-radius: 10px;
    background: #f7faf7;
}

.ayt-coach__missing { margin: 0.5rem 0 0; padding-left: 1.2rem; font-size: 0.92rem; color: #3d5560; }

/* Attachments */
.ayt-attach { margin: 1rem 0; }
.ayt-files { list-style: none; padding: 0; margin: 0.6rem 0 0; }
.ayt-files__item { display: flex; align-items: center; gap: 0.6rem; padding: 0.35rem 0; flex-wrap: wrap; }
.ayt-files__item a { color: #0B2D39; font-weight: 600; word-break: break-all; }
.ayt-files__size { font-size: 0.8rem; color: #5b6b72; }
.ayt-files__name { color: #0B2D39; font-weight: 600; word-break: break-all; }
.ayt-files--picked { margin-bottom: 0.4rem; }

/* Replies on the neighbor's request page (/ask/my/{id}) */
.ayt-banner--ok { border-left-color: #8FAE91; background: #f3f7f3; }

.ayt-reply {
    border-top: 1px solid #e5e0d4;
    padding: 1.1rem 0 0.4rem;
    margin-top: 1.1rem;
}

.ayt-reply--dismissed { opacity: 0.6; }

.ayt-reply__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.75rem; }
.ayt-reply__name { font-weight: 700; font-size: 1.08rem; color: #0B2D39; }
.ayt-reply__meta { font-size: 0.85rem; color: #5b6b72; display: inline-flex; gap: 0.4rem; align-items: center; }

.ayt-tag {
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
    background: #F5F2E7;
    color: #0B2D39;
}

.ayt-tag--hired { background: #8FAE91; color: #fff; }

.ayt-status--hidden { background: #C96E4A; color: #fff; }

/* A reply's conversation, both sides */
.ayt-thread { margin: 1rem 0 0; }
.ayt-thread__list { list-style: none; padding: 0; margin: 0 0 0.75rem; display: grid; gap: 0.6rem; }

.ayt-thread__msg {
    max-width: 85%;
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
    background: #F5F2E7;
    display: grid;
    gap: 0.2rem;
}

.ayt-thread__msg--mine { justify-self: end; background: #e8eff0; }
.ayt-thread__who { font-size: 0.78rem; color: #5b6b72; }
.ayt-thread__body { white-space: pre-line; line-height: 1.5; }
.ayt-textarea--short { min-height: 80px; }

.ayt-hire-search { margin: 0.4rem 0 0.6rem 1.6rem; }
.ayt-contact { margin: 0.75rem 0 0; padding: 0.75rem 0.9rem; background: #f3f7f3; border-radius: 10px; }

/* The message after an action: stays in view after the page reloads at its old scroll. */
.ayt-banner[data-ayt-flash] { position: sticky; top: 1rem; z-index: 5; transition: opacity 0.4s; }
.ayt-banner[data-ayt-flash].is-fading { opacity: 0; }

/* Owner pages (/ask/requests, /ask/settings/{id}) */
.ayt--wide { max-width: 960px; }
.ayt-listings { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.ayt-listings .ayt-card { margin-bottom: 0; }
.ayt-card--compact { padding: 1.1rem 1.2rem; }
.ayt-card--upgrade { border-color: #F4B400; background: #FFFBEF; }
.ayt-gains { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.ayt-gains li { padding-left: 0.85rem; border-left: 3px solid #F4B400; }
.ayt-gains__title { display: block; font-weight: 700; }
.ayt-gains__detail { font-size: 0.92rem; color: #5b6b72; }
/* An in-section offer: why the next plan helps here, and the button to get it. */
.ayt-upsell { margin-top: 0.9rem; padding: 0.75rem 0.9rem; border: 1px solid #F4B400; border-radius: 10px; background: #FFFBEF; }
.ayt-upsell p { margin: 0 0 0.6rem; font-size: 0.92rem; }
.ayt-upsell .ayt-actions { margin-top: 0; }
.ayt-missed { margin: 0.75rem 0 0; padding: 0.6rem 0.8rem; border-radius: 8px; background: #FBF1EC; color: #6b3b27; font-size: 0.92rem; }
.ayt-missed a { color: #6b3b27; font-weight: 700; }
.ayt-list--flush { margin-top: 0; }
.ayt-list__link--new { border-color: #F4B400; box-shadow: inset 4px 0 0 #F4B400; }
.ayt-inline-form { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.ayt-inline-form .ayt-input { flex: 1 1 220px; width: auto; }

/* Named businesses on a direct request, and invites (/ask) */
.ayt-direct { margin: 0 0 1.25rem; padding: 0 0 1rem; border-bottom: 1px solid #e5e0d4; }
.ayt-direct__list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ayt-direct__list .ayt-chip { cursor: default; background: #0B2D39; color: #F5F2E7; border-color: #0B2D39; }
.ayt-chip__remove { border: 0; background: none; color: inherit; font-size: 1.1rem; line-height: 1; padding: 0 0 0 0.2rem; cursor: pointer; }
.ayt-direct__results { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; margin-top: 0.4rem; font-size: 0.92rem; }
.ayt-direct__option { border: 0; background: none; padding: 0.2rem 0; color: #0B2D39; text-decoration: underline; cursor: pointer; text-align: left; }
.ayt-invite { border-top: 1px dashed #e5e0d4; padding-top: 0.5rem; }

/* Trust and feedback (phase 7) */
.ayt-hired-count { display: block; font-size: 0.82rem; color: #4f6e52; font-weight: 600; }
.ayt-benchmark, .ayt-feedback { margin: 0.9rem 0 0; padding: 0.75rem 0.9rem; border-radius: 10px; background: #f3f7f3; }
.ayt-benchmark ul, .ayt-feedback ul { margin: 0.25rem 0 0.4rem; padding-left: 1.1rem; font-size: 0.94rem; }
.ayt-benchmark--locked { background: #F5F2E7; }

/* A listing's photo beside its name (_ListingPhoto, AskYourTown.photo) */
.ayt-photo { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 8px; object-fit: cover; background: #F5F2E7; border: 1px solid #e5e0d4; }
.ayt-photo--lg { width: 56px; height: 56px; flex-basis: 56px; border-radius: 10px; }
.ayt-photo--empty { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #0B2D39; font-size: 1.05rem; }
.ayt-photo--lg.ayt-photo--empty { font-size: 1.4rem; }
.ayt-listing { display: inline-flex; align-items: center; gap: 0.6rem; min-width: 0; }
.ayt-chip .ayt-photo { width: 28px; height: 28px; flex-basis: 28px; border-radius: 6px; margin-left: -0.45rem; border-color: transparent; }
.ayt-chip .ayt-photo--empty { font-size: 0.8rem; }
.ayt-choice--listing { display: flex; align-items: center; gap: 0.6rem; }
.ayt-direct__option { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.ayt-direct__option span { text-decoration: underline; }
.ayt-direct__option .ayt-photo { width: 32px; height: 32px; flex-basis: 32px; }
.ayt-listing, .ayt-listing:hover { text-decoration: none; }
.ayt-listing:hover .ayt-reply__name { text-decoration: underline; }

/* Where each reply stands (ReplyProgress) */
.ayt-needs-you { margin: 0 0 0.5rem; font-weight: 700; color: #0B2D39; }
.ayt-reply--needs-you { border-left: 4px solid #F4B400; padding-left: 1rem; }
.ayt-progress { margin: 0.75rem 0 0.5rem; padding: 0.75rem 0.9rem; background: #F5F2E7; border-radius: 10px; }
.ayt-steps { list-style: none; margin: 0 0 0.6rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 0; counter-reset: ayt-step; }
.ayt-steps__item { position: relative; display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; color: #8a8f8a; padding-right: 1.6rem; }
.ayt-steps__item:last-child { padding-right: 0; }
.ayt-steps__item::before { content: ""; width: 0.8rem; height: 0.8rem; border-radius: 50%; border: 2px solid #cfc8b8; background: #fff; flex: none; }
.ayt-steps__item:not(:last-child)::after { content: ""; position: absolute; right: 0.4rem; top: 50%; width: 0.8rem; border-top: 2px solid #cfc8b8; }
.ayt-steps__item--done { color: #3f6b48; }
.ayt-steps__item--done::before { background: #8FAE91; border-color: #8FAE91; }
.ayt-steps__item--done::after { border-color: #8FAE91 !important; }
.ayt-steps__item--current { color: #0B2D39; font-weight: 700; }
.ayt-steps__item--current::before { background: #F4B400; border-color: #0B2D39; }
.ayt-progress__now { margin: 0; font-weight: 700; color: #0B2D39; }
.ayt-progress__next { margin: 0.15rem 0 0; font-size: 0.92rem; color: #3f4a4d; }
.ayt-feedback__takeaway { margin: 0.5rem 0 0; padding-top: 0.5rem; border-top: 1px solid #e0d6bb; font-weight: 600; color: #0B2D39; }
.ayt-feedback__takeaway + .ayt-feedback__takeaway { border-top: 0; padding-top: 0; margin-top: 0.25rem; }

/* /ask/for-businesses */
.ayt-biz__caption { font-size: 0.82rem; color: #5b6b72; }
.ayt-biz__listing .ayt-listing { align-items: center; }
.ayt-biz__steps { margin: 0; padding-left: 1.25rem; line-height: 1.6; }
.ayt-biz__steps li { margin-bottom: 0.6rem; }
.ayt-biz__fit { padding-left: 1.25rem; line-height: 1.6; }
.ayt-biz__fit li { margin-bottom: 0.5rem; }
.ayt-biz__table-wrap { overflow-x: auto; margin: 1rem 0; }
.ayt-biz__plans { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 520px; }
.ayt-biz__plans th, .ayt-biz__plans td { padding: 0.6rem 0.5rem; border-bottom: 1px solid #ece7da; vertical-align: top; }
.ayt-biz__plans thead th { text-align: center; font-family: Georgia, serif; font-size: 1.05rem; border-bottom: 2px solid #0B2D39; }
.ayt-biz__plans thead th span { display: block; font-family: inherit; font-size: 0.85rem; font-weight: 600; color: #C96E4A; }
.ayt-biz__plans tbody th { text-align: left; font-weight: 600; width: 40%; }
.ayt-biz__plans td { text-align: center; }
.ayt-biz__plans td.is-yes { color: #3f6b48; }
.ayt-biz__plans td.is-no { color: #b4ad9d; }
.ayt-biz__note { display: block; font-weight: 400; font-size: 0.82rem; color: #5b6b72; margin-top: 0.15rem; }
.ayt-biz__q summary { font-weight: 600; cursor: pointer; padding: 0.4rem 0; }
.ayt-biz__q p { margin: 0.25rem 0 0.75rem; line-height: 1.55; }

/* A coupon offered with a reply. */
.ayt-offer { display: inline-block; padding: 0.3rem 0.75rem; border-radius: 999px; background: #F4B400; color: #0B2D39; font-weight: 700; font-size: 0.9rem; text-decoration: none; }
a.ayt-offer:hover { background: #e0a600; color: #0B2D39; }
.ayt-offer--ended { background: #ECE8DA; color: #5b6b72; font-weight: 600; }

/* /ask/requests: Pro's demand trends. */
.ayt-demand__table { width: 100%; margin: 0.6rem 0 0.25rem; border-collapse: collapse; font-size: 0.9rem; }
.ayt-demand__table th { text-align: left; font-weight: 600; color: #5b6b72; border-bottom: 1px solid #E3DED0; padding: 0.3rem 0.4rem; }
.ayt-demand__table td { border-bottom: 1px solid #EFEBDF; padding: 0.35rem 0.4rem; }
@media (max-width: 560px) {
    .ayt-demand__table th:nth-child(3), .ayt-demand__table td:nth-child(3) { display: none; }
}

/* /ask/my and /ask/requests as tabs of one page, for owners who also ask. */
.ayt-tabs { display: flex; gap: 0.25rem; margin: 0 0 1.25rem; border-bottom: 2px solid #E3DED0; }
.ayt-tabs__tab { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.55rem 1rem; margin-bottom: -2px; border-bottom: 3px solid transparent; color: #5b6b72; font-weight: 600; text-decoration: none; }
.ayt-tabs__tab:hover { color: #0B2D39; }
.ayt-tabs__tab.is-active { color: #0B2D39; border-bottom-color: #F4B400; }
