/* === ФОРМА НАЛОГОВОГО ВЫЧЕТА === */
.tax-form {
  --primary: #EA594D;
  --primary-hover: #d44a3e;
  --primary-light: rgba(234, 89, 77, 0.07);
  --text: #1a1a1a;
  --text-secondary: #666;
  --border: #e8e8e8;
  --bg-input: #fafafa;
  --bg-card: #ffffff;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);

  padding: 20px;
  max-width: 780px;
  margin: 24px auto;
  font-family: "Ubuntu", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.tax-form .form-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tax-form .form-section legend {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 16px 20px !important;
  margin: 0 !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--border) !important;
  background: #fdfdfd !important;
  float: none !important;
}

.tax-form .form-section legend .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.tax-form .form-section .section-body {
  padding: 16px 20px 18px;
}

.tax-form .form-section:nth-child(1) .section-body,
.tax-form .form-section:nth-child(2) .section-body,
.tax-form .form-section:nth-child(4) .section-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}

.tax-form .form-section:nth-child(3) .section-body {
  display: block;
}

.tax-form .section-body .doc-type-selector,
.tax-form .section-body .conditional-block,
.tax-form .section-body .doc-hint,
.tax-form .section-body .error-message {
  grid-column: 1 / -1;
}

.tax-form .conditional-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin-top: 6px;
  padding: 14px 0 2px 16px;
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 6px;
}

.tax-form .conditional-block .doc-type-selector,
.tax-form .conditional-block .doc-hint {
  grid-column: 1 / -1;
}

.tax-form .form-section label {
  display: block;
  margin-bottom: 15px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.tax-form input[type="text"],
.tax-form input[type="email"],
.tax-form input[type="tel"],
.tax-form input[type="date"],
.tax-form select {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 10px 14px;
  margin-top: 4px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm) !important;
  font-size: 1rem;
  color: var(--text);
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tax-form input:focus,
.tax-form select:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px var(--primary-light);
}

.tax-form input::placeholder {
  color: #b0b0b0;
}

.tax-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b0b0b0' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.tax-form .radio-label,
.tax-form .checkbox-label {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  margin-right: 20px;
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.tax-form input[type="radio"],
.tax-form input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin: 0;
}

.tax-form .doc-type-selector p {
  margin: 0 0 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.tax-form .doc-hint {
  margin: 10px 0 0;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 400;
  color: #666;
  line-height: 1.4;
  background: #fdf8f7;
  border: 1px solid #f5d5d1;
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.tax-form .required {
  color: var(--primary);
}

.tax-form .form-submit-wrapper {
  padding: 0 20px;
  max-width: 780px;
  margin: 0 auto;
}

.tax-form .submit-btn {
  display: block !important;
  width: 230px !important;
  margin-left: auto !important;
  background: var(--primary) !important;
  color: #fff !important;
  border: none !important;
  padding: 15px 25px !important;
  border-radius: var(--radius-sm) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  margin-top: 4px !important;
  margin-bottom: 20px !important;
}

.tax-form .submit-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(234, 89, 77, 0.3);
}

.tax-form .submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tax-form .form-success {
  margin: 0px 20px 16px 20px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  background: #f0fdf4;
  border: 2px solid #22c55e;
  color: #166534;
}

.tax-form .form-error {
  margin: 0px 20px 16px 20px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  background: #fef2f2;
  border: 2px solid var(--primary);
  color: #991b1b;
}

.tax-form .error-message {
  color: var(--primary);
  font-size: 0.8rem;
  margin-bottom: 15px;
}

.tax-form a {
  color: var(--primary);
}

.tax-form .consent-label {
  white-space: normal;
  flex-wrap: wrap;
}

.tax-form .smart-captcha {
  margin-top: 16px;
  margin-bottom: 10px;
  height: 125px !important;
}

.tax-form-wrapper .daw-success-message {
    text-align: center;
    padding: 60px 40px;
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.tax-form-wrapper .daw-success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #EA594D 0%, #c0392b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: white;
    box-shadow: 0 8px 30px rgba(234, 89, 77, 0.3);
    animation: bounce 0.6s ease;
}

.tax-form-wrapper .daw-success-message h3 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
}

.tax-form-wrapper .form-success-text {
    font-size: 17px;
    font-weight: 500;
    color: #7f8c8d;
    margin: 15px 0 0;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@media (max-width: 768px) {
    .tax-form-wrapper .daw-success-message {
        padding: 40px 20px;
    }
    
    .tax-form-wrapper .daw-success-icon {
        width: 80px;
        height: 80px;
        font-size: 40px;
    }
    
    .tax-form-wrapper .form-success-text {
        max-width: 200px;
        margin: 15px auto 0;
    }
}


@media (max-width: 600px) {
  .tax-form {
    padding: 10px;
  }

  .tax-form .form-section:nth-child(1) .section-body,
  .tax-form .form-section:nth-child(2) .section-body,
  .tax-form .form-section:nth-child(4) .section-body,
  .tax-form .conditional-block {
    grid-template-columns: 1fr;
  }

  .tax-form .form-section legend {
    padding: 14px 16px !important;
  }

  .tax-form .form-section .section-body {
    padding: 12px 16px 14px;
  }

  .tax-form .submit-btn {
    width: 100% !important;
  }
  
}

@media (max-width: 480px) {

   .tax-form-wrapper {
        margin: -25px;
    }

    .tax-form .smart-captcha {
        min-width: unset !important;
        height: 125px !important;
    }
 
}
