/* ============================================================
   MEDIA.LEAD — Бриф для старта работ
   Comprehensive project brief form styling
   ============================================================ */

/* ── Reset for brief page ──────────────────────────────────── */
.page-brief {
  background: #FAFAFA;
  color: #1A1A1A;
  min-height: 100vh;
  cursor: auto !important;
}
.page-brief *, .page-brief *::before, .page-brief *::after {
  cursor: auto !important;
  box-sizing: border-box;
}
.page-brief button, .page-brief a, .page-brief label,
.page-brief .bf-chip, .page-brief .bf-radio-card {
  cursor: pointer !important;
}
.page-brief input, .page-brief textarea, .page-brief select {
  cursor: text !important;
}
.cursor-dot, .cursor-ring { display: none !important; }

/* ── Header ────────────────────────────────────────────────── */
.bf-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  background: #0A0A0F;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}
.bf-header__left {
  display: flex;
  align-items: center;
  gap: 24px;
}
.bf-header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.bf-header__logo img {
  height: 26px;
  width: auto;
}
.bf-header__back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-body);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}
.bf-header__back:hover { color: #FFFFFF; }

.bf-header__right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.bf-save-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  color: #22c55e;
  opacity: 0;
  transition: opacity 0.3s;
}
.bf-save-status.visible { opacity: 1; }
.bf-save-status .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

/* ── Burger Button ─────────────────────────────────────────── */
.bf-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer !important;
}
.bf-burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #FFFFFF;
  border-radius: 2px;
  transition: all 0.3s;
}
.bf-burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.bf-burger.active span:nth-child(2) {
  opacity: 0;
}
.bf-burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Mobile Menu ───────────────────────────────────────────── */
.bf-mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0; right: 0;
  bottom: 0;
  background: #0A0A0F;
  z-index: 99;
  padding: 24px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.bf-mobile-menu.open {
  opacity: 1;
  visibility: visible;
}
.bf-mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bf-mobile-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}
.bf-mobile-nav__item::before {
  content: attr(data-num);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
}
.bf-mobile-nav__item:hover,
.bf-mobile-nav__item:active {
  background: rgba(255,255,255,0.05);
  color: #FFFFFF;
}

/* ── Layout ────────────────────────────────────────────────── */
.bf-layout {
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 72px;
  min-height: 100vh;
}

/* ── Sidebar Nav ───────────────────────────────────────────── */
.bf-sidebar {
  position: sticky;
  top: 72px;
  width: 240px;
  flex-shrink: 0;
  height: calc(100vh - 72px);
  overflow-y: auto;
  padding: 32px 0 32px 16px;
  border-right: 1px solid #E5E5E5;
  background: #FFFFFF;
}
.bf-sidebar::-webkit-scrollbar { width: 0; }

.bf-nav { list-style: none; padding: 0; margin: 0; }
.bf-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: #6B6B6B;
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 2px;
  line-height: 1.4;
}
.bf-nav__item:hover {
  color: #1A1A1A;
  background: #F5F5F5;
}
.bf-nav__item.active {
  color: #1A1A1A;
  background: #EFEFEF;
}
.bf-nav__num {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid #D0D0D0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
  transition: all 0.2s;
  color: #6B6B6B;
}
.bf-nav__item.active .bf-nav__num {
  background: #FF3A3A;
  border-color: #FF3A3A;
  color: #fff;
}
.bf-nav__item.filled .bf-nav__num {
  background: #E8F5E9;
  border-color: #4CAF50;
  color: #2E7D32;
}

/* ── Main Content ──────────────────────────────────────────── */
.bf-main {
  flex: 1;
  min-width: 0;
  padding: 40px 40px 120px;
}

/* ── Page Title ────────────────────────────────────────────── */
.bf-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: #1A1A1A;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 8px;
}
.bf-subtitle {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  color: #6B6B6B;
  margin-bottom: 48px;
  max-width: 560px;
}

/* ── Section ───────────────────────────────────────────────── */
.bf-section {
  margin-bottom: 56px;
  scroll-margin-top: 100px;
  transition: opacity 0.3s, max-height 0.3s;
}
.bf-section[style*="display: none"] {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}
.bf-section__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid #E5E5E5;
}
.bf-section__num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(130deg, #FF3A3A 0%, #7D72FE 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.bf-section__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #1A1A1A;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.bf-section__desc {
  font-family: var(--font-body);
  font-size: 14px;
  color: #6B6B6B;
  margin-bottom: 24px;
  line-height: 22px;
}

/* ── Form Group ────────────────────────────────────────────── */
.bf-group {
  margin-bottom: 28px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}
.bf-label {
  display: block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1A;
  margin-bottom: 8px;
  line-height: 20px;
}
.bf-label .req {
  color: #FF3A3A;
  margin-left: 2px;
}
.bf-label-hint {
  font-weight: 400;
  color: #8B8B8B;
  font-size: 13px;
  display: block;
  margin-top: 2px;
}

/* ── Inputs ────────────────────────────────────────────────── */
.bf-input,
.bf-textarea,
.bf-select {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #FFFFFF;
  border: 1.5px solid #D0D0D0;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: #1A1A1A;
  outline: none;
  transition: all 0.2s;
  -webkit-appearance: none;
}
.bf-input::placeholder,
.bf-textarea::placeholder {
  color: #ABABAB;
}
.bf-input:focus,
.bf-textarea:focus,
.bf-select:focus {
  border-color: #7D72FE;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(125, 114, 254, 0.1);
}
.bf-input.has-value {
  border-color: #8B8B8B;
}
.bf-textarea {
  resize: vertical;
  min-height: 100px;
  max-height: 300px;
  line-height: 24px;
}
.bf-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%235C5C70'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.bf-input--half {
  max-width: 320px;
}

/* ── Two-column fields ─────────────────────────────────────── */
.bf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
  width: 100%;
}
.bf-row .bf-group {
  margin-bottom: 0;
  min-width: 0;
}
@media (max-width: 767px) {
  .bf-row {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* ── Chips (pill toggles for multi-select) ─────────────────── */
.bf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1.5px solid #D0D0D0;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: #6B6B6B;
  background: #FFFFFF;
  transition: all 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.bf-chip:hover {
  border-color: #8B8B8B;
  color: #1A1A1A;
  background: #F5F5F5;
}
.bf-chip.selected {
  background: #FFE5E5;
  border-color: #FF3A3A;
  color: #1A1A1A;
}
.bf-chip.selected::before {
  content: "✓";
  font-size: 12px;
  color: #FF3A3A;
  font-weight: 700;
}

/* ── Radio Cards ───────────────────────────────────────────── */
.bf-radio-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.bf-radio-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  background: #FFFFFF;
  border: 1.5px solid #D0D0D0;
  border-radius: var(--radius-xl);
  transition: all 0.25s;
  user-select: none;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.bf-radio-card:hover {
  background: #F5F5F5;
  border-color: #8B8B8B;
  transform: translateY(-2px);
}
.bf-radio-card.selected {
  background: #FFE5E5;
  border-color: #FF3A3A;
  box-shadow: 0 4px 12px rgba(255, 58, 58, 0.12);
}
.bf-radio-card__icon {
  font-size: 28px;
  line-height: 1;
}
.bf-radio-card__label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: #1A1A1A;
  line-height: 1.3;
}
.bf-radio-card__sub {
  font-family: var(--font-body);
  font-size: 12px;
  color: #8B8B8B;
}

/* ── Checkbox List ─────────────────────────────────────────── */
.bf-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bf-check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  transition: background 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.bf-check:hover {
  background: #F5F5F5;
}
.bf-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border: 1.5px solid #D0D0D0;
  border-radius: 5px;
  background: #FFFFFF;
  flex-shrink: 0;
  transition: all 0.2s;
  position: relative;
  cursor: pointer !important;
}
.bf-check input[type="checkbox"]:checked {
  background: linear-gradient(130deg, #FF3A3A 0%, #7D72FE 100%);
  border-color: #FF3A3A;
}
.bf-check input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.bf-check__label {
  font-family: var(--font-body);
  font-size: 15px;
  color: #6B6B6B;
  line-height: 1.4;
}
.bf-check input[type="checkbox"]:checked + .bf-check__label {
  color: #1A1A1A;
  font-weight: 500;
}

/* ── Divider ───────────────────────────────────────────────── */
.bf-divider {
  height: 1px;
  background: #E5E5E5;
  margin: 48px 0;
}

/* ── Submit Area ───────────────────────────────────────────── */
.bf-submit-area {
  padding: 40px 0;
  border-top: 2px solid #E5E5E5;
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.bf-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(130deg, #FF3A3A 0%, #7D72FE 100%);
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 18px 40px;
  border: none;
  border-radius: var(--radius-lg);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(255, 58, 58, 0.25);
}
.bf-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 58, 58, 0.35);
}
.bf-submit-btn:active { transform: translateY(0); }
.bf-submit-btn:disabled {
  opacity: 0.5;
  pointer-events: none;
  transform: none;
}
.bf-submit-hint {
  font-family: var(--font-body);
  font-size: 13px;
  color: #8B8B8B;
}

/* ── Clear Data Link ───────────────────────────────────────── */
.bf-clear-data {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  color: #ABABAB;
  background: none;
  border: none;
  padding: 8px 0;
  transition: color 0.2s;
}
.bf-clear-data:hover { color: #FF3A3A; }

/* ── Progress bar (top) ────────────────────────────────────── */
.bf-progress {
  position: fixed;
  top: 72px; left: 0; right: 0;
  height: 3px;
  background: #E5E5E5;
  z-index: 99;
}
.bf-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, #FF3A3A 0%, #7D72FE 100%);
  transition: width 0.4s var(--ease-out);
  width: 0;
  box-shadow: 0 0 10px rgba(255, 58, 58, 0.3);
}

/* ── Responsive: Tablet ────────────────────────────────────── */
@media (max-width: 960px) {
  .bf-sidebar { display: none; }
  .bf-main { padding: 32px 24px 100px; }
  .bf-header { padding: 0 20px; }
  .bf-title { font-size: 28px; }
  .bf-layout { max-width: 100%; }
}

/* ── Responsive: Mobile ────────────────────────────────────── */
@media (max-width: 767px) {
  .bf-header { height: 60px; padding: 0 16px; }
  .bf-header__logo img { height: 22px; }
  .bf-header__back { display: none; }
  .bf-burger { display: flex; }
  .bf-mobile-menu { display: block; top: 60px; }
  .bf-layout { padding-top: 60px; }
  .bf-progress { top: 60px; }
  .bf-main { padding: 24px 16px 80px; }
  .bf-title { font-size: 24px; line-height: 1.3; margin-bottom: 10px; }
  .bf-subtitle { font-size: 15px; line-height: 22px; margin-bottom: 36px; }
  .bf-section { margin-bottom: 48px; }
  .bf-section__header { gap: 10px; margin-bottom: 20px; padding-bottom: 12px; }
  .bf-section__num { width: 28px; height: 28px; font-size: 13px; }
  .bf-section__title { font-size: 17px; }
  .bf-section__desc { font-size: 14px; margin-bottom: 20px; }
  .bf-group { margin-bottom: 24px; }
  .bf-label { font-size: 13px; margin-bottom: 7px; }
  .bf-radio-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .bf-radio-card { padding: 16px 12px; }
  .bf-radio-card__icon { font-size: 24px; }
  .bf-radio-card__label { font-size: 13px; }
  .bf-radio-card__sub { font-size: 11px; }
  .bf-input, .bf-textarea, .bf-select { font-size: 16px; padding: 12px 15px; }
  .bf-textarea { min-height: 90px; }
  .bf-chip { padding: 9px 15px; font-size: 13px; }
  .bf-chips { gap: 8px; }
  .bf-submit-btn { width: 100%; justify-content: center; padding: 16px; font-size: 14px; }
  .bf-submit-area { padding: 32px 0; margin-top: 40px; }
  .bf-submit-hint { font-size: 12px; }
  .bf-check { padding: 10px 12px; }
  .bf-check__label { font-size: 14px; }
  .bf-input--half { max-width: 100%; }
}

/* ── Help Button (Fixed) ───────────────────────────────────── */
.bf-help-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: linear-gradient(130deg, #FF3A3A 0%, #7D72FE 100%);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 20px rgba(255, 58, 58, 0.3), 0 2px 8px rgba(0,0,0,0.15);
  cursor: pointer !important;
  transition: all 0.3s;
}
.bf-help-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(255, 58, 58, 0.4), 0 4px 12px rgba(0,0,0,0.2);
}
.bf-help-btn__icon {
  font-size: 18px;
}
@media (max-width: 767px) {
  .bf-help-btn {
    bottom: 16px;
    right: 16px;
    padding: 12px 16px;
    font-size: 13px;
  }
  .bf-help-btn__text { display: none; }
  .bf-help-btn__icon { font-size: 22px; }
}

/* ── Help Popup ────────────────────────────────────────────── */
.bf-help-popup {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.bf-help-popup.open {
  opacity: 1;
  visibility: visible;
}
.bf-help-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.bf-help-popup__content {
  position: relative;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 40px;
  max-width: 400px;
  width: calc(100% - 32px);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s var(--ease-out);
}
.bf-help-popup.open .bf-help-popup__content {
  transform: scale(1) translateY(0);
}
.bf-help-popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F5F5F5;
  border: none;
  color: #6B6B6B;
  font-size: 16px;
  cursor: pointer !important;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bf-help-popup__close:hover {
  background: #EEEEEE;
  color: #1A1A1A;
}
.bf-help-popup__icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.bf-help-popup__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #1A1A1A;
  margin-bottom: 12px;
}
.bf-help-popup__text {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 22px;
  color: #6B6B6B;
  margin-bottom: 24px;
}
.bf-help-popup__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: #0088cc;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}
.bf-help-popup__btn:hover {
  background: #0077b5;
  transform: translateY(-1px);
}
.bf-help-popup__btn svg {
  flex-shrink: 0;
}
.bf-help-popup__divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  font-family: var(--font-body);
  font-size: 13px;
  color: #ABABAB;
}
.bf-help-popup__divider::before,
.bf-help-popup__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #E5E5E5;
}
.bf-help-popup__subtext {
  font-family: var(--font-body);
  font-size: 14px;
  color: #6B6B6B;
  margin-bottom: 12px;
}
.bf-help-popup__link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: #FF3A3A;
  text-decoration: none;
  transition: color 0.2s;
}
.bf-help-popup__link:hover {
  color: #7D72FE;
}
@media (max-width: 767px) {
  .bf-help-popup__content {
    padding: 32px 24px;
    margin: 16px;
  }
  .bf-help-popup__title { font-size: 20px; }
  .bf-help-popup__text { font-size: 14px; }
}

