/* ===== Lang Directory — Add bureau form =====
 * Requires ld-primitives.css.
 * ============================================ */

/* ===== Page hero ===== */
.ld-ab-hero {
  background: linear-gradient(135deg, #0c326f 0%, #1d63cb 60%, #2f81db 100%);
  border-radius: var(--ld-radius-lg);
  padding: var(--ld-space-6);
  color: #fff;
  margin-bottom: var(--ld-space-6);
  position: relative;
  overflow: hidden;
}

.ld-ab-hero::before {
  content: '';
  position: absolute;
  right: -80px; top: -80px;
  width: 220px; height: 220px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
  pointer-events: none;
}

.ld-ab-hero__crumbs {
  font-size: 12px;
  color: rgba(255,255,255,.65);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: var(--ld-space-3);
}
.ld-ab-hero__crumbs a { color: rgba(255,255,255,.8); text-decoration: none; }
.ld-ab-hero__crumbs a:hover { color: #fff; text-decoration: underline; }
.ld-ab-hero__crumbs-sep { opacity: .7; }

.ld-ab-hero__eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.65);
  margin: 0 0 6px;
}

.ld-ab-hero__title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--ld-space-2);
  color: #fff;
}

.ld-ab-hero__subtitle {
  font-size: 14px;
  color: rgba(255,255,255,.8);
  line-height: 1.6;
  margin: 0;
  max-width: 520px;
}

@media (min-width: 640px) {
  .ld-ab-hero__subtitle { font-size: 15px; }
}

/* ===== Two-column layout ===== */
.ld-ab-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ld-space-4);
  align-items: start;
  padding-bottom: 64px;
}

@media (min-width: 768px) {
  .ld-ab-wrap {
    grid-template-columns: 2fr 1fr;
    gap: var(--ld-space-6);
  }
}

/* ===== Form card ===== */
.ld-ab-form-card {
  background: linear-gradient(135deg, rgba(29,99,203,.06), rgba(47,129,219,.03));
  border: 1px solid rgba(29,99,203,.16);
  border-radius: var(--ld-radius-md);
  padding: var(--ld-space-5);
}

/* ===== Section heading inside form ===== */
.ld-ab-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ld-text);
  margin: 0 0 var(--ld-space-3);
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: var(--ld-space-2);
  border-bottom: 1px solid rgba(29,99,203,.12);
}

.ld-ab-section-title::before {
  content: '';
  display: inline-block;
  width: 3px; height: 16px;
  border-radius: 2px;
  flex-shrink: 0;
  background: var(--ld-primary);
}

.ld-ab-section + .ld-ab-section {
  margin-top: var(--ld-space-5);
}

/* ===== Field rows ===== */
.ld-ab-field {
  margin-bottom: var(--ld-space-3);
}

.ld-ab-field:last-child { margin-bottom: 0; }

.ld-ab-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ld-text);
  margin-bottom: 5px;
}

.ld-ab-label span {
  color: var(--ld-muted);
  font-weight: 400;
}

.ld-ab-input,
.ld-ab-select,
.ld-ab-textarea {
  width: 100%;
  padding: 0 12px;
  height: 42px;
  border: 1px solid var(--ld-border);
  border-radius: var(--ld-radius-sm);
  font-size: 14px;
  color: var(--ld-text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}

.ld-ab-textarea {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  min-height: 80px;
}

.ld-ab-input:focus,
.ld-ab-select:focus,
.ld-ab-textarea:focus {
  outline: none;
  border-color: var(--ld-primary);
  box-shadow: 0 0 0 3px rgba(29,99,203,.12);
}

.ld-ab-input::placeholder,
.ld-ab-textarea::placeholder {
  color: var(--ld-muted);
  opacity: .7;
}

/* Two-col grid for short fields */
.ld-ab-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ld-space-3);
}

@media (max-width: 479px) {
  .ld-ab-row-2 { grid-template-columns: 1fr; }
}

/* Three-col grid for price */
.ld-ab-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 80px;
  gap: var(--ld-space-3);
}

@media (max-width: 479px) {
  .ld-ab-row-3 { grid-template-columns: 1fr 1fr; }
  .ld-ab-row-3 .ld-ab-field:last-child { grid-column: 1 / -1; }
}

/* ===== Checkbox grid (services) ===== */
.ld-ab-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.ld-ab-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--ld-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: 13px;
  color: var(--ld-text);
  user-select: none;
}

.ld-ab-checkbox-item:hover {
  border-color: rgba(29,99,203,.4);
  background: rgba(29,99,203,.04);
}

.ld-ab-checkbox-item input[type="checkbox"] {
  flex-shrink: 0;
  accent-color: var(--ld-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.ld-ab-checkbox-item input:checked + span {
  color: var(--ld-primary);
  font-weight: 500;
}

/* ===== Submit button ===== */
.ld-ab-submit-row {
  margin-top: var(--ld-space-5);
  display: flex;
  align-items: center;
  gap: var(--ld-space-3);
  flex-wrap: wrap;
}

.ld-ab-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 var(--ld-space-5);
  height: 48px;
  background: var(--ld-primary);
  color: #fff;
  border: none;
  border-radius: var(--ld-radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
}

.ld-ab-submit-btn:hover {
  background: #1558b0;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(29,99,203,.35);
}

.ld-ab-submit-btn:active {
  transform: none;
  box-shadow: none;
}

.ld-ab-submit-note {
  font-size: 12px;
  color: var(--ld-muted);
  line-height: 1.5;
}

/* ===== Notice messages ===== */
.ld-ab-notice {
  padding: var(--ld-space-3) var(--ld-space-4);
  border-radius: var(--ld-radius-sm);
  font-size: 14px;
  margin-bottom: var(--ld-space-4);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ld-ab-notice--success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}

.ld-ab-notice--error {
  background: #fff1f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* ===== Sidebar ===== */
.ld-ab-aside-block {
  background: linear-gradient(135deg, rgba(29,99,203,.06), rgba(47,129,219,.03));
  border: 1px solid rgba(29,99,203,.16);
  border-radius: var(--ld-radius-md);
  padding: var(--ld-space-4);
  margin-bottom: var(--ld-space-4);
}

.ld-ab-aside-block__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ld-text);
  margin: 0 0 var(--ld-space-3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ld-ab-aside-block__title::before {
  content: '';
  display: inline-block;
  width: 3px; height: 16px;
  border-radius: 2px;
  background: #10b981;
  flex-shrink: 0;
}

.ld-ab-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ld-ab-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: var(--ld-muted);
  line-height: 1.5;
}

.ld-ab-step__num {
  flex-shrink: 0;
  width: 24px; height: 24px;
  background: rgba(29,99,203,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ld-primary);
}

.ld-ab-aside-cta {
  background: linear-gradient(135deg, #0c326f 0%, #1d63cb 100%);
  border-radius: var(--ld-radius-md);
  padding: var(--ld-space-4);
  color: #fff;
  text-align: center;
  margin-bottom: var(--ld-space-4);
}

.ld-ab-aside-cta__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 var(--ld-space-2);
}

.ld-ab-aside-cta__text {
  font-size: 13px;
  color: rgba(255,255,255,.8);
  line-height: 1.5;
  margin: 0 0 var(--ld-space-3);
}

.ld-ab-aside-cta .ld-btn {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  width: 100%;
  justify-content: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: var(--ld-radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: background .15s;
}

.ld-ab-aside-cta .ld-btn:hover { background: rgba(255,255,255,.28); }

/* ===== Success page ===== */
.ld-ab-success {
  text-align: center;
  padding: var(--ld-space-6) var(--ld-space-4);
}

.ld-ab-success__icon {
  width: 64px; height: 64px;
  background: #f0fdf4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--ld-space-4);
}

.ld-ab-success__icon svg {
  width: 32px; height: 32px;
  stroke: #16a34a;
}

.ld-ab-success__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ld-text);
  margin: 0 0 var(--ld-space-2);
}

.ld-ab-success__text {
  font-size: 15px;
  color: var(--ld-muted);
  line-height: 1.6;
  margin: 0 0 var(--ld-space-5);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Service types + documents accordion ===== */
.ld-ab-hint {
  font-size: 13px;
  color: var(--ld-muted);
  margin: 0 0 10px;
  line-height: 1.5;
}

.ld-ab-svc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 600px) {
  .ld-ab-svc-grid { grid-template-columns: repeat(3, 1fr); }
}

.ld-ab-svc-col {
  border: 1px solid var(--ld-border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.ld-ab-svc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(29,99,203,.06);
  border-bottom: 1px solid var(--ld-border);
  gap: 6px;
}

.ld-ab-svc-check {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.ld-ab-svc-check input {
  flex-shrink: 0;
  accent-color: var(--ld-primary);
  width: 15px;
  height: 15px;
  cursor: pointer;
  margin: 0;
}

.ld-ab-svc-name {
  font-weight: 600;
  font-size: 12px;
  color: var(--ld-text);
  line-height: 1.3;
}

.ld-ab-toggle {
  background: none;
  border: 1px solid var(--ld-border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  color: var(--ld-muted);
  padding: 2px 6px;
  flex-shrink: 0;
  line-height: 1.4;
  transition: border-color .15s, color .15s;
}

.ld-ab-toggle:hover {
  border-color: var(--ld-primary);
  color: var(--ld-primary);
}

.ld-ab-doc-list {
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 200px;
  overflow-y: auto;
}

.ld-ab-doc-list.is-collapsed { display: none; }

.ld-ab-doc-check {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 0;
  color: var(--ld-text);
  line-height: 1.35;
  user-select: none;
}

.ld-ab-doc-check input {
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--ld-primary);
  cursor: pointer;
}

.ld-ab-svc-col--off .ld-ab-svc-head { background: #f6f7f7; }
.ld-ab-svc-col--off .ld-ab-doc-list { opacity: .4; pointer-events: none; }

.ld-ab-global-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 12px;
}

.ld-ab-global-actions a {
  color: var(--ld-primary);
  text-decoration: none;
  cursor: pointer;
}

.ld-ab-global-actions a:hover { text-decoration: underline; }
