/* Общие стили для всех версий приложения */

/* Site Navigation */
.site-nav {
  position: relative;
}

.nav-toggle {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  z-index: 1000;
  overflow: hidden;
}

.nav-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  text-decoration: none;
  border-bottom: 1px solid #eee;
  transition: background 0.2s;
}

.nav-menu a:last-child {
  border-bottom: none;
}

.nav-menu a:hover {
  background: var(--background);
}

.nav-menu a.active {
  background: var(--primary-color);
  color: white;
}

:root {
  --primary-color: #1976D2;
  --primary-dark: #1565C0;
  --accent-color: #4FC3F7;
  --accent-dark: #29B6F6;
  --success-color: #43A047;
  --danger-color: #E53935;
  --warning-color: #FFB74D;
  --info-color: #4FC3F7;
  --background: #F5F7FA;
  --surface: #FFFFFF;
  --text-color: #2E3A45;
  --subtext-color: #607D8B;
  --border-color: #CFD8DC;
  --bg-section: #F5F7FA;
  --text-muted: #607D8B;
  --label-color: #607D8B;
  
  --border-radius: 8px;
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --box-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Основные настройки */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background);
}

/* Утилиты для печати */
.print-only {
  display: none;
}

@media print {
  .no-print {
    display: none !important;
  }
  
  .print-only {
    display: block !important;
  }
  
  body {
    background: white;
  }
  
  header, footer, 
  .btn, 
  #register-section {
    display: none !important;
  }
  
  .receipt {
    page-break-inside: avoid;
    page-break-after: always;
    box-shadow: none !important;
    border: 1px solid #000 !important;
  }
  
  .receipt:last-child {
    page-break-after: auto;
  }
}

/* Стили для квитанций */
.receipt {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
  font-size: 0.9rem;
}

.receipt-header {
  border-bottom: 2px solid var(--text-color);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.receipt-title {
  font-size: 1.1rem;
  font-weight: bold;
  text-transform: uppercase;
  margin: 0;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e9ecef;
}

.receipt-row:last-child {
  border-bottom: none;
}

.receipt-label {
  font-weight: 600;
  color: var(--label-color);
}

.receipt-value {
  text-align: right;
  color: var(--text-color);
}

.receipt-amount {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--success-color);
}

/* Анимации */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Стили для форм */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Отключение синего фона при автозаполнении браузером */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px white inset !important;
  box-shadow: 0 0 0 30px white inset !important;
  -webkit-text-fill-color: var(--text-color) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Улучшенные стили для кнопок */
.btn {
  transition: all 0.2s ease-in-out;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--box-shadow);
}

.btn:active {
  transform: translateY(0);
}

/* Стили для подсказок */
.hint-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Адаптивность */
@media (max-width: 768px) {
  .receipt {
    font-size: 0.85rem;
    padding: 1rem;
  }
  
  .receipt-title {
    font-size: 1rem;
  }
  
  .receipt-amount {
    font-size: 1.1rem;
  }
}

/* Стили для details/summary */
details summary {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

details summary:hover {
  color: var(--primary-color);
}

details[open] summary {
  margin-bottom: 0.5rem;
}

/* Стили для языковых переключателей */
.lang-switcher {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

.lang-switcher .btn {
  margin-left: 0.25rem;
}

/* ============================================
   ОБЩИЕ СТИЛИ ДЛЯ БЛОКА ПОДТВЕРЖДЕНИЯ
   Используется на всех страницах с платежками
   ============================================ */

/* Секция формы на полную ширину */
#form-section {
  width: 100%;
  max-width: 100%;
}

.confirmation-block {
  max-width: 210mm;
  margin: 15px auto 0;
  padding: 15px;
    width: min(100%, 210mm);
  border: 1px solid #CFD8DC;
  border-radius: 8px;
}

/* ============================================
   ОБЩИЕ АДАПТИВНЫЕ СТИЛИ ДЛЯ ФОРМ ПЛАТЕЖЕК
   Единые breakpoints для всех страниц
   ============================================ */

/* Планшеты и маленькие десктопы */
@media (max-width: 991px) {
  .uplatnica-form {
    width: 100%;
    margin-bottom: 20px;
  }
  
  .confirmation-block {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

/* Мобильные устройства средние */
@media (max-width: 768px) {
  .uplatnica-form {
    padding: 3mm;
  }
}

/* ============================================
   СТИЛИ ДЛЯ ФУТЕРА С КОНТАКТАМИ
   ============================================ */
.site-footer {
  background: #1565C0;
  color: white;
  padding: 2rem 0;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: white;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-contacts {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-contacts a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}

.footer-contacts a:hover {
  color: white;
  opacity: 1;
}

.footer-copyright {
  margin: 0;
  opacity: 0.8;
  font-size: 0.9rem;
}

/* Стили для простого футера на внутренних страницах */
footer.text-muted .footer-contacts {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

footer.text-muted .footer-contacts a {
  color: var(--primary-color);
  text-decoration: none;
  transition: opacity 0.2s;
}

footer.text-muted .footer-contacts a:hover {
  opacity: 0.8;
  text-decoration: underline;
}
