/* ==========================================================================
   Questionnaire (Анкета на визу в Индию) Component Styles
   assets/css/anketa.css
   ========================================================================== */

.anketa-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}

.anketa-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.anketa-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.anketa-quick-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  margin: 0 auto 1.5rem;
  max-width: 820px;
}

.anketa-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text-secondary, #475569);
  background-color: var(--color-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.anketa-quick-btn:hover {
  color: var(--color-accent, #0f91cf);
  background-color: var(--color-accent-light, #f0f9ff);
  border-color: rgba(15, 145, 207, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(15, 145, 207, 0.12);
}

.anketa-quick-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--color-accent, #0f91cf);
  transition: transform 0.2s ease;
}

.anketa-quick-btn:hover svg {
  transform: scale(1.1);
}

.anketa-step {
  background-color: var(--color-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-xl, 1.25rem);
  padding: clamp(1rem, 3.5vw, 2.25rem);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
  margin-bottom: 2rem;
  position: relative;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.anketa-step:hover {
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0,0,0,0.1));
  border-color: #cbd5e1;
}

.anketa-step-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1.5px solid var(--border-color, #e2e8f0);
}

.anketa-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #0f91cf 0%, #0b7eb6 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.15rem;
  border-radius: var(--radius-md, 0.5rem);
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(15, 145, 207, 0.25);
}

.anketa-step-meta {
  flex: 1;
}

.anketa-step-title {
  font-size: clamp(1.2rem, 2.2vw, 1.4rem);
  font-weight: 700;
  color: var(--color-text-main, #0f172a);
  line-height: 1.3;
  margin: 0;
}

.anketa-step-desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary, #475569);
  margin-top: 0.35rem;
  line-height: 1.5;
  margin-bottom: 0;
}

.anketa-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.anketa-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.anketa-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 960px) {
  .anketa-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .anketa-grid-2, .anketa-grid-3, .anketa-grid-4 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.anketa-field {
  margin-bottom: 1.25rem;
}

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

.anketa-label {
  display: block;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--color-text-main, #0f172a);
  margin-bottom: 0.45rem;
  line-height: 1.4;
}

.anketa-req {
  color: #dc2626;
  font-weight: 700;
  margin-left: 2px;
}

.anketa-hint {
  font-size: 0.825rem;
  color: var(--color-text-muted, #64748b);
  margin-top: 0.35rem;
  line-height: 1.45;
  margin-bottom: 0;
}

/* Callout Alerts */
.anketa-callout {
  border-radius: var(--radius-md, 0.5rem);
  padding: 1rem 1.25rem;
  font-size: 0.925rem;
  line-height: 1.55;
  margin-bottom: 1.35rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.anketa-callout-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.anketa-callout-warning {
  background-color: #fffdf5;
  border: 1.5px solid #fde68a;
  color: #78350f;
}

.anketa-callout-info {
  background-color: var(--color-accent-light, #f0f9ff);
  border: 1.5px solid rgba(15, 145, 207, 0.25);
  color: #0369a1;
}

.anketa-callout-success {
  background-color: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  color: #14532d;
}

/* Visa Duration Selection Cards */
.anketa-visa-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
  .anketa-visa-grid {
    grid-template-columns: 1fr;
  }
}

.anketa-visa-card {
  border: 2px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-lg, 0.75rem);
  padding: 1.35rem 1.25rem;
  background: var(--color-surface, #ffffff);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  user-select: none;
}

.anketa-visa-card:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0,0,0,0.1));
}

.anketa-visa-card:has(input:checked),
.anketa-visa-card.active {
  border-color: var(--color-accent, #0f91cf);
  background: #f8faff;
  box-shadow: 0 0 0 3px rgba(15, 145, 207, 0.15), var(--shadow-md, 0 4px 6px -1px rgba(0,0,0,0.1));
}

.anketa-visa-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.anketa-visa-radio {
  accent-color: var(--color-accent, #0f91cf);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.anketa-visa-badge {
  font-size: 0.775rem;
  font-weight: 700;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
}

.anketa-visa-badge-hot {
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
}

.anketa-visa-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text-main, #0f172a);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.anketa-visa-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-accent, #0f91cf);
  margin-bottom: 0.5rem;
}

.anketa-visa-features {
  font-size: 0.85rem;
  color: var(--color-text-secondary, #475569);
  line-height: 1.5;
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.anketa-visa-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.anketa-visa-feature-item::before {
  content: "✓";
  color: var(--color-success, #16a34a);
  font-weight: 800;
}

/* File Upload Dropzones */
.anketa-dropzone-card {
  background: var(--color-surface-soft, #f8fafc);
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg, 0.75rem);
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: all 0.15s ease;
  cursor: pointer;
  position: relative;
}

.anketa-dropzone-card:hover, .anketa-dropzone-card.drag-over {
  border-color: var(--color-accent, #0f91cf);
  background-color: var(--color-accent-light, #f0f9ff);
}

.anketa-dropzone-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.anketa-dropzone-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.75rem;
  color: var(--color-accent, #0f91cf);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: var(--radius-md, 0.5rem);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
}

.anketa-dropzone-title {
  font-weight: 700;
  font-size: 0.975rem;
  color: var(--color-text-main, #0f172a);
  margin-bottom: 0.25rem;
}

.anketa-dropzone-subtitle {
  font-size: 0.825rem;
  color: var(--color-text-muted, #64748b);
}

.anketa-file-preview {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: #ffffff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-md, 0.5rem);
  gap: 0.75rem;
}

.anketa-preview-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: var(--radius-sm, 0.375rem);
  border: 1px solid var(--border-color, #e2e8f0);
  background-color: #f8fafc;
  flex-shrink: 0;
}

.anketa-file-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.anketa-file-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-main, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.anketa-file-size {
  font-size: 0.775rem;
  color: var(--color-text-muted, #64748b);
}

.anketa-file-del {
  padding: 0.35rem 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm, 0.375rem);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.anketa-file-del:hover {
  background: #fee2e2;
}

/* Radio & Checkbox Pills */
.anketa-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.anketa-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-md, 0.5rem);
  background-color: var(--color-surface, #ffffff);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary, #475569);
  transition: all 0.15s ease;
  user-select: none;
}

.anketa-pill:hover {
  border-color: #94a3b8;
  color: var(--color-text-main, #0f172a);
}

.anketa-pill input[type="radio"],
.anketa-pill input[type="checkbox"] {
  accent-color: var(--color-accent, #0f91cf);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.anketa-pill.active,
.anketa-pill:has(input:checked) {
  border-color: var(--color-accent, #0f91cf);
  background-color: var(--color-accent-light, #f0f9ff);
  color: var(--color-accent, #0f91cf);
  font-weight: 600;
}

/* Security Questions Box */
.anketa-security-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.anketa-security-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.anketa-security-item .anketa-pill-row {
  flex-shrink: 0;
  flex-wrap: nowrap;
}

@media (max-width: 600px) {
  .anketa-security-item {
    flex-direction: column;
    gap: 0.75rem;
  }
}

.anketa-security-text {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--color-text-main, #0f172a);
  line-height: 1.45;
}

.anketa-security-sub {
  font-size: 0.825rem;
  font-weight: 400;
  color: var(--color-text-muted, #64748b);
  margin-top: 0.25rem;
}

/* Sticky Action Bar */
.anketa-footer-bar {
  background: var(--color-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-xl, 1.25rem);
  padding: 1.5rem clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0,0,0,0.1));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 680px) {
  .anketa-footer-bar {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .anketa-footer-bar .btn {
    width: 100%;
    padding: 0.85rem 1.25rem !important;
    white-space: normal !important;
  }
}

.anketa-autosave-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: #166534;
  font-weight: 600;
}

.anketa-dot {
  width: 9px;
  height: 9px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  display: inline-block;
}

/* Modal Summary Details */
.anketa-summary-pre {
  background: #f8fafc;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-md, 0.5rem);
  padding: 1.25rem;
  max-height: 280px;
  overflow-y: auto;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.825rem;
  line-height: 1.55;
  color: var(--color-text-main, #0f172a);
  white-space: pre-wrap;
  margin-bottom: 1.5rem;
  user-select: all;
}

/* ==========================================================================
   Telegram Floating Corner Widget (Ненавязчивый виджет в правом углу)
   ========================================================================== */
.tg-corner-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 950;
  width: 320px;
  max-width: calc(100vw - 2rem);
  background: #ffffff;
  border-radius: var(--radius-xl, 1rem);
  box-shadow: 0 14px 38px -6px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(226, 232, 240, 0.95);
  padding: 1.15rem 1.15rem 1rem;
  font-family: inherit;
  opacity: 0;
  transform: translateY(24px) scale(0.95);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.tg-corner-widget.tg-widget-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.tg-widget-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.tg-widget-close::before {
  content: "";
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -10px;
}

.tg-widget-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.tg-widget-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.tg-widget-avatar-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.tg-widget-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 3px 10px rgba(15, 145, 207, 0.2);
}

.tg-widget-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #22c55e;
  border: 2px solid #ffffff;
  border-radius: 50%;
}

.tg-widget-author-info {
  display: flex;
  flex-direction: column;
}

.tg-widget-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.tg-widget-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #166534;
}

.tg-widget-pulse {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: tgPulse 2s infinite;
}

@keyframes tgPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.tg-widget-body {
  margin-bottom: 0.75rem;
}

.tg-widget-text {
  font-size: 0.9rem;
  line-height: 1.45;
  color: #334155;
  margin: 0;
}

.tg-widget-footer {
  display: flex;
}

.tg-widget-btn {
  width: 100%;
  justify-content: center;
  gap: 0.5rem;
  background: #229ed9;
  color: #ffffff;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-md, 0.5rem);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.3);
  transition: all 0.2s ease;
}

.tg-widget-btn:hover {
  background: #1d88bd;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(34, 158, 217, 0.4);
  color: #ffffff;
}

@media (max-width: 640px) {
  .tg-corner-widget {
    bottom: 0.85rem;
    right: 0.85rem;
    left: auto;
    width: 290px;
    max-width: calc(100vw - 1.7rem);
    padding: 0.75rem 0.85rem 0.75rem;
    border-radius: var(--radius-lg, 0.75rem);
    box-shadow: 0 10px 30px -4px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(226, 232, 240, 0.95);
  }
  .tg-widget-close {
    top: 0.4rem;
    right: 0.4rem;
    width: 24px;
    height: 24px;
  }
  .tg-widget-header {
    gap: 0.6rem;
    margin-bottom: 0.45rem;
  }
  .tg-widget-avatar-wrap,
  .tg-widget-avatar {
    width: 36px;
    height: 36px;
  }
  .tg-widget-status-dot {
    width: 10px;
    height: 10px;
  }
  .tg-widget-name {
    font-size: 0.88rem;
  }
  .tg-widget-status {
    font-size: 0.7rem;
    gap: 0.25rem;
  }
  .tg-widget-body {
    margin-bottom: 0.55rem;
  }
  .tg-widget-text {
    font-size: 0.8rem;
    line-height: 1.35;
  }
  .tg-widget-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    gap: 0.4rem;
    border-radius: var(--radius-md, 0.5rem);
  }
  .tg-widget-btn .btn-icon {
    width: 16px;
    height: 16px;
  }
  .tg-widget-toggle {
    bottom: 0.85rem;
    right: 0.85rem;
    width: 50px;
    height: 50px;
  }
  .tg-toggle-avatar {
    width: 44px;
    height: 44px;
  }
}

/* ==========================================================================
   Validation Error Highlighting (Pulsating Focus & Scroll)
   ========================================================================== */
.field-invalid-highlight {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.35) !important;
  animation: fieldShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both, pulseGlow 1.8s infinite ease-in-out !important;
  outline: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.anketa-pill-row.field-invalid-highlight,
.anketa-dropzone-card.field-invalid-highlight,
.anketa-consent-wrap.field-invalid-highlight,
label.field-invalid-highlight {
  border: 2px solid #ef4444 !important;
  border-radius: var(--radius-md, 8px) !important;
  padding: 0.5rem 0.75rem !important;
}

@keyframes fieldShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.15);
  }
}





