/* ===== radionorma.ru — Custom Styles (ТЗ additions) ===== */

/* --- Package Card Expand/Collapse (Section 1.4) --- */
.package-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
  opacity: 0;
}

.package-details.expanded {
  max-height: 2000px;
  opacity: 1;
  transition: max-height 0.5s ease-in, opacity 0.3s ease-in;
}

.btn-podrobnee .chevron-icon {
  transition: transform 0.3s ease;
}

.btn-podrobnee.active .chevron-icon {
  transform: rotate(180deg);
}

/* --- Package Card Button Alignment (Section 1.3) --- */
.package-card {
  display: flex;
  flex-direction: column;
}

.package-card .card-actions {
  margin-top: auto;
}

/* --- Stage Card Expand/Collapse (Section 2.2) --- */
.stage-full-text {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
  opacity: 0;
}

.stage-full-text.expanded {
  max-height: 1000px;
  opacity: 1;
  transition: max-height 0.5s ease-in, opacity 0.3s ease-in;
}

.stage-card-header {
  cursor: pointer;
  user-select: none;
}

.stage-card-header .stage-chevron {
  transition: transform 0.3s ease;
}

.stage-card-header.active .stage-chevron {
  transform: rotate(180deg);
}

/* --- Document Banners (Section 3.1) --- */
.doc-banner-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.doc-banner-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* --- Callback Form (Section 4.1) --- */
.callback-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.callback-input:focus {
  border-color: #4CAF50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

.callback-input::placeholder {
  color: #9ca3af;
}

/* Phone mask styling */
.phone-wrapper {
  position: relative;
}

.phone-wrapper .callback-input {
  padding-left: 2.5rem;
}

.phone-wrapper .phone-prefix {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 0.875rem;
  pointer-events: none;
}

/* --- Form Success Message --- */
.form-success-msg {
  display: none;
  padding: 1rem;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 0.5rem;
  color: #166534;
  font-size: 0.875rem;
  text-align: center;
}

.form-success-msg.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* --- Utility Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
  .package-details.expanded {
    max-height: 3000px;
  }

  .stage-full-text.expanded {
    max-height: 2000px;
  }
}

#contact-form button[type="submit"] {
    transition: background 0.2s ease;
}
#contact-form button[type="submit"].disabled {
    background: #6b7280 !important;
    opacity: 0.5;
    cursor: not-allowed;
}
#contact-form button[type="submit"]:not(.disabled):hover {
    background: #388E3C !important;
}

/* ===== ВИЗУАЛЬНАЯ ГАЛОЧКА ДЛЯ ЧЕКБОКСА ===== */
#agreement[data-state="checked"] {
    background-color: #4CAF50 !important;
    border-color: #4CAF50 !important;
    position: relative;
}

#agreement[data-state="checked"]::after {
    content: "✓" !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: bold !important;
    position: absolute !important;
    top: -2px !important;
    left: 2px !important;
    line-height: 1 !important;
}