/* ==========================================================================
   RAMSTAT Compact Footer Design System Stylesheet
   Used on all pages to ensure FASIE (ФСИ) grant compliance & unified branding
   ========================================================================== */

.app-compact-footer {
  --ram-orange: #f76505;
  --ram-orange-hover: #e95a00;
  --ram-orange-light: #fff3ec;
  --ram-orange-glow: rgba(247, 101, 5, 0.18);
  --ram-font-title: 'Montserrat', 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ram-font-body: 'Onest', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
  background: #191512;
  color: #ffffff;
  padding: 56px 24px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--ram-font-body);
  position: relative;
  z-index: 10;
  width: 100%;
}

.app-compact-footer *,
.app-compact-footer *::before,
.app-compact-footer *::after {
  box-sizing: border-box;
}

.app-compact-footer__inner {
  max-width: 1360px;
  margin: 0 auto;
}

.app-compact-footer__top {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-compact-footer__brand-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.app-compact-footer__tagline {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 20px;
  max-width: 320px;
  line-height: 1.5;
}

/* Split Format CTA Button ("Попробовать бесплатно" - Orange main + White arrow, compact scale) */
.app-compact-footer__cta-wrap {
  display: flex;
  align-items: center;
}

.app-compact-footer__trial-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: transparent;
  transition: transform 0.22s ease, filter 0.22s ease;
  width: fit-content;
}

.app-compact-footer__trial-cta:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 6px 18px rgba(255, 132, 11, 0.28));
}

.app-compact-footer__trial-cta:active {
  transform: translateY(0);
}

.app-compact-footer__trial-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

.app-compact-footer__trial-svg {
  display: block;
  height: 45px;
  width: auto;
}

.app-compact-footer__trial-bg {
  fill: #f76505;
  transition: fill 0.22s ease;
}

.app-compact-footer__trial-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 18px;
  padding-left: 10px;
  color: #ffffff;
  font-family: var(--ram-font-title);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: color 0.22s ease, text-shadow 0.22s ease;
}

.app-compact-footer__arrow-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
  pointer-events: none;
}

.app-compact-footer__arrow-svg {
  display: block;
  height: 41px;
  width: auto;
}

.app-compact-footer__arrow-bg {
  fill: #ffffff;
  transition: fill 0.22s ease;
}

.app-compact-footer__arrow-lines {
  stroke: #f76505;
  stroke-width: 4.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: stroke 0.22s ease, transform 0.22s ease;
}

.app-compact-footer__arrow-lines line,
.app-compact-footer__arrow-lines polyline {
  stroke: #f76505;
  stroke-width: 4.5px;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: stroke 0.22s ease;
}

.app-compact-footer__trial-cta:hover .app-compact-footer__trial-bg {
  fill: #ffffff;
}

.app-compact-footer__trial-cta:hover .app-compact-footer__trial-label {
  color: #f76505;
  text-shadow: none;
}

.app-compact-footer__trial-cta:hover .app-compact-footer__arrow-bg {
  fill: #f76505;
}

.app-compact-footer__trial-cta:hover .app-compact-footer__arrow-lines {
  stroke: #ffffff;
  transform: translateX(6px);
}

.app-compact-footer__trial-cta:hover .app-compact-footer__arrow-lines line,
.app-compact-footer__trial-cta:hover .app-compact-footer__arrow-lines polyline {
  stroke: #ffffff;
}

.app-compact-footer__social {
  display: flex;
  gap: 10px;
  align-items: center;
}

.app-compact-footer__social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.app-compact-footer__social a:hover {
  background: var(--ram-orange);
  transform: translateY(-2px);
}

.app-compact-footer__social img {
  width: 16px;
  height: 16px;
}

.app-compact-footer__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.app-compact-footer__col h4 {
  font-family: var(--ram-font-title);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
}

.app-compact-footer__col a {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.18s;
}

.app-compact-footer__col a:hover {
  color: var(--ram-orange);
}

.app-compact-footer__support {
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.app-compact-footer__support-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  max-width: 680px;
  margin: 0;
  line-height: 1.5;
}

.app-compact-footer__logo {
  display: inline-block;
  line-height: 0;
  transition: transform 0.2s ease;
}

.app-compact-footer__logo:hover {
  transform: translateY(-1px);
}

.app-compact-footer__logo img {
  height: 34px;
  width: auto;
  display: block;
  transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.app-compact-footer__logo img:not([src*="orange"]) {
  filter: invert(47%) sepia(91%) saturate(2135%) hue-rotate(360deg) brightness(102%) contrast(106%);
}

.app-compact-footer__support-logos {
  display: flex;
  align-items: center;
  gap: 28px;
}

.app-compact-footer__support-logos img {
  height: 44px;
  max-height: 46px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(0.65);
  transition: filter 0.22s ease, opacity 0.22s ease, transform 0.22s ease;
}

.app-compact-footer__support-logos img:hover {
  filter: brightness(0) invert(1) opacity(0.95);
  transform: translateY(-2px);
}

.app-compact-footer__bottom {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

/* Page Layout Context Rules */
.ozon-workspace {
  display: flex !important;
  flex-direction: column !important;
}

.ozon-workspace > .ozon-page-layout {
  flex: 1 0 auto !important;
}

.main-content > .app-compact-footer {
  margin-left: -40px;
  margin-right: -40px;
  margin-bottom: -40px;
  margin-top: 40px;
  width: calc(100% + 80px);
}

/* Auth Pages Flex Sticking */
body.auth-page-body,
body:has(.login-card),
body:has(.verify-shell) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.auth-page-body .main-content,
body:has(.login-card) .main-content,
body:has(.verify-shell) .verify-shell {
  flex: 1 0 auto;
}

/* Contacts Page */
.contacts-page {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
}

.contacts-page__shell {
  flex: 1 0 auto !important;
  min-height: auto !important;
}

/* Responsive Rules */
@media (max-width: 860px) {
  .app-compact-footer__top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .app-compact-footer__links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .main-content > .app-compact-footer {
    margin-left: -12px;
    margin-right: -12px;
    margin-bottom: -24px;
    margin-top: 24px;
    width: calc(100% + 24px);
  }
}

@media (max-width: 540px) {
  .app-compact-footer__links {
    grid-template-columns: 1fr;
  }
  .app-compact-footer__brand-head {
    justify-content: space-between;
    gap: 14px;
  }
}

@media (max-width: 420px) {
  .app-compact-footer__trial-svg {
    height: 38px;
  }
  .app-compact-footer__arrow-svg {
    height: 34px;
  }
  .app-compact-footer__trial-label {
    font-size: 12px;
    padding-right: 14px;
  }
  .app-compact-footer__trial-cta {
    gap: 6px;
  }
}
