/* Формы сайта: общая форма компании, окна на странице фирмы, «Написать нам», личный кабинет.
   Подключается только на страницах с формами (блок head_extra в base/skeleton.html). */
.ff, .ff * { box-sizing: border-box; }
.ff-section { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.ff-section legend { font-size: 17px; font-weight: bold; padding: 0 0 6px; margin-bottom: 12px; border-bottom: 1px solid #e6e6e6; width: 100%; }
.ff-label { display: block; margin: 10px 0 5px; font-weight: bold; font-size: 14px; color: #333; }
.ff-input { width: 100%; padding: 9px 11px; border: 1px solid #cfd6dc; border-radius: 5px; background: #fff; font-family: inherit; font-size: 14px; color: #222; }
textarea.ff-input { resize: vertical; min-height: 90px; line-height: 1.45; }
.ff-input:focus { outline: none; border-color: #39b3e7; box-shadow: 0 0 0 3px rgba(57, 179, 231, .18); }
.ff-input:disabled { background: #f3f5f7; color: #888; }
.ff-invalid { border-color: #d93025; }
.ff-error { color: #c5221f; font-size: 13px; margin-top: 5px; }
.ff-alert { background: #fdecea; border: 1px solid #f5c6c2; color: #8a1c13; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.ff-note { background: #eef7fd; border: 1px solid #cbe6f6; color: #1d4f6e; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; line-height: 1.45; }
.ff-success { background: #e8f5e9; border: 1px solid #c3e6c6; color: #1e5b24; padding: 12px 14px; border-radius: 6px; margin: 10px 0; font-size: 15px; }
.ff-hint { color: #777; font-size: 12px; margin-top: 5px; }
.ff-row { display: flex; gap: 12px; flex-wrap: wrap; }
.ff-col { flex: 1 1 150px; min-width: 0; }
.ff-col-2 { flex: 2 1 260px; }
.ff-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin: 4px 14px 4px 0; cursor: pointer; }
.ff-checks { margin-bottom: 8px; }
.ff-contact-row { display: flex; gap: 8px; margin-bottom: 8px; }
.ff-contact-row select { flex: 0 0 165px; }
.ff-contact-row input { flex: 1 1 auto; }
.ff-remove { flex: 0 0 38px; border: 1px solid #f0c4c0; background: #fff5f4; color: #c5221f; border-radius: 5px; font-size: 18px; cursor: pointer; }
.ff-remove:hover { background: #fde4e1; }
.ff-btn-light { padding: 8px 14px; background: #f4f6f8; border: 1px solid #cfd6dc; border-radius: 5px; cursor: pointer; font-size: 14px; }
.ff-btn-light:hover { background: #e9edf0; }
.ff-btn { display: inline-block; padding: 12px 22px; background: #39b3e7; color: #fff; border: 0; border-radius: 5px; font-size: 16px; font-weight: bold; cursor: pointer; text-decoration: none; }
.ff-btn:hover { background: #229fd6; color: #fff; }
.ff-btn-danger { background: #dc3545; }
.ff-btn-danger:hover { background: #c22c3a; }
.ff-btn-block { display: block; width: 100%; text-align: center; }
.ff-cat-box { position: relative; }
.ff-cat-results { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid #cfd6dc; border-top: 0; max-height: 240px; overflow-y: auto; box-shadow: 0 6px 14px rgba(0, 0, 0, .08); }
.ff-cat-item { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; border-bottom: 1px solid #f0f0f0; background: #fff; cursor: pointer; font-size: 14px; }
.ff-cat-item:hover { background: #f1f9fd; }
.ff-cat-empty { padding: 9px 12px; color: #888; font-size: 14px; }
.ff-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ff-pill { display: inline-flex; align-items: center; gap: 6px; background: #0b72b9; color: #fff; padding: 5px 6px 5px 12px; border-radius: 16px; font-size: 13px; }
.ff-pill button { border: 0; background: rgba(255, 255, 255, .2); color: #fff; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 18px; padding: 0; }
.ff-wt { background: #f8fafb; border: 1px solid #e5e9ec; border-radius: 6px; padding: 10px 14px; margin-top: 8px; }
.ff-wt-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; flex-wrap: wrap; }
.ff-wt-day { flex: 0 0 115px; font-weight: bold; font-size: 14px; }
.ff-time { width: auto; padding: 6px 8px; }
.ff-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ff-previews img { width: 74px; height: 74px; object-fit: cover; border-radius: 5px; border: 1px solid #ddd; }
.ff-card { text-align: left; max-width: 820px; margin: 20px auto 50px; background: #fff; padding: 28px 30px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, .08); }
.ff-card h1, .ff-card h2 { margin-top: 0; }
.ff-honey { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Окна на странице фирмы */
.spr-modal[hidden] { display: none; }
.spr-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-start; justify-content: center; padding: 40px 12px; background: rgba(15, 35, 50, .55); overflow-y: auto; }
.spr-modal-box { position: relative; text-align: left; width: 100%; max-width: 560px; background: #fff; border-radius: 10px; padding: 24px 26px; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
.spr-modal-box h2 { margin: 0 30px 10px 0; font-size: 21px; }
.spr-modal-box p { color: #555; line-height: 1.45; margin: 0 0 14px; font-size: 14px; }
.spr-modal-close { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 28px; line-height: 1; color: #999; cursor: pointer; }
.spr-modal-close:hover { color: #333; }
.firm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.firm-actions a, .firm-actions button { font-size: 13px; padding: 5px 11px; border-radius: 4px; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.firm-hidden-banner { background: #fdecea; border: 1px solid #f5c6c2; color: #8a1c13; padding: 10px 14px; border-radius: 6px; margin: 10px 0; }
.service-link .sidebar-list-item button.link-like { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; text-align: left; }
.review-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.review-photos img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid #e3e3e3; }

/* Личный кабинет */
.cab-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 20px; border-bottom: 2px solid #e6eef3; }
.cab-nav a { padding: 9px 14px; text-decoration: none; color: #333; border-bottom: 3px solid transparent; margin-bottom: -2px; font-size: 15px; }
.cab-nav a.active { border-bottom-color: #39b3e7; color: #0b72b9; font-weight: bold; }
.cab-badge { display: inline-block; min-width: 19px; padding: 1px 6px; border-radius: 10px; background: #e53935; color: #fff; font-size: 12px; font-weight: bold; text-align: center; margin-left: 4px; }
.cab-list { list-style: none; padding: 0; margin: 0; }
.cab-item { background: #fff; padding: 16px 18px; margin-bottom: 12px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, .07); text-align: left; }
.cab-item h3 { margin: 0 0 6px; font-size: 17px; }
.cab-meta { color: #777; font-size: 13px; }
.cab-status { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: bold; }
.cab-status.pending { background: #fff4e0; color: #9a5b00; }
.cab-status.approved, .cab-status.answered { background: #e6f4ea; color: #1e6b2e; }
.cab-status.rejected, .cab-status.closed { background: #fdecea; color: #a1281d; }
.cab-reply { background: #f1f8fd; border-left: 3px solid #39b3e7; padding: 10px 12px; margin-top: 10px; white-space: pre-line; }
.cab-reply.new { border-left-color: #e53935; background: #fff7f6; }
.cab-text { white-space: pre-line; margin-top: 8px; line-height: 1.45; }
.cab-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cab-actions a { padding: 6px 12px; border-radius: 4px; text-decoration: none; font-size: 14px; }
.cab-btn { background: #0b72b9; color: #fff; }
.cab-btn-light { background: #f1f3f5; color: #333; border: 1px solid #d6dbe0; }
@media (max-width: 600px) {
    .ff-card { padding: 18px 14px; }
    .ff-contact-row { flex-wrap: wrap; }
    .ff-contact-row select { flex: 1 1 100%; }
    .ff-wt-day { flex-basis: 100%; }
}
