﻿/* Extracted from site-new.css. Legacy rules remain in site-new.css until visual verification is complete. */

@media (max-width: 1040px) {
  .new-header {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .new-nav {
    display: none;
  }

  .new-workspace-back {
    display: none !important;
  }

  .new-mobile-menu {
    display: block;
  }

  .new-mobile-menu-panel {
    right: auto;
    left: 0;
  }

  .new-auth {
    grid-column: 3;
  }

  .new-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 2rem;
  }

  .new-hero-visual {
    min-height: 30rem;
    order: 2;
  }

  .composer {
    grid-template-columns: 1fr;
    padding-top: 1rem;
  }

  .main-stack,
  .side-stack {
    min-height: auto;
    grid-template-rows: none;
  }

  .url-source-group.has-preview {
    grid-template-columns: 1fr;
  }

  .new-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .new-step-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .composer .main-stack,
  .composer .side-stack {
    display: contents;
  }

  #usage-panel {
    order: -1;
  }

  .ai-assistant-panel {
    gap: 0.45rem;
    height: clamp(15rem, 60svh, 28rem);
    min-height: 15rem;
    max-height: 28rem;
    padding: 0.8rem;
  }

  .ai-assistant-head {
    gap: 0.45rem;
  }

  .ai-assistant-title {
    gap: 0.35rem;
  }

  .ai-assistant-title h2 {
    font-size: 0.96rem;
  }

  .ai-assistant-head-actions {
    gap: 0.3rem;
  }

  .ai-model-badge {
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ai-chat-preview {
    min-height: 0;
    max-height: none;
  }

  .ai-chat-empty {
    min-height: 0;
    flex: 1 1 0;
    padding: 1rem 0.75rem;
  }

  .ai-chat-empty p {
    width: min(100%, 20rem);
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .ai-message {
    max-width: 92%;
    padding: 0.48rem 0.55rem 0.36rem;
  }

  .ai-message-content {
    font-size: 0.82rem;
  }

  .ai-quick-prompts {
    width: 100%;
    gap: 0.3rem;
  }

  .ai-quick-prompts button {
    min-height: 1.65rem;
    padding: 0.24rem 0.36rem;
    font-size: 0.68rem;
  }

  .ai-composer {
    height: 2.15rem;
    flex-basis: 2.15rem;
  }

  .ai-composer textarea {
    font-size: 0.76rem;
  }

  .ai-composer button {
    width: 2.15rem;
  }

  .ai-assistant-panel.is-expanded {
    height: calc(100svh - 2rem);
    min-height: min(15rem, calc(100svh - 2rem));
    max-height: calc(100svh - 2rem);
  }

  .new-main {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .new-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .new-mobile-menu {
    justify-self: end;
  }

  .new-mobile-menu-panel {
    right: 0;
    left: auto;
  }

  .new-brand {
    font-size: 1.18rem;
  }

  .new-auth {
    display: none;
  }

  .auth-actions {
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.35rem;
  }

  .auth-main {
    width: 100%;
  }

  #tg-login {
    max-width: 100%;
    overflow: hidden;
    width: 100%;
  }

  #tg-login iframe {
    max-width: 12.5rem;
  }

  #auth-user {
    max-width: 100%;
    padding: 0.34rem 0.52rem;
    font-size: 0.78rem;
  }

  .new-hero {
    gap: 1.5rem;
    padding-top: 1.25rem;
  }

  .new-hero-copy {
    gap: 0.85rem;
  }

  .new-pill {
    width: max-content;
    align-items: flex-start;
    border-radius: 999px;
    font-size: 0.82rem;
  }

  .new-hero h1 {
    font-size: clamp(2.35rem, 12vw, 3.25rem);
  }

  .new-hero-description {
    font-size: 1rem;
    line-height: 1.5;
  }

  .new-hero-actions,
  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .status-footer {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
  }

  .status-footer .status-new-task {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  .status-footer .result-actions {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    gap: 0.25rem;
    margin-left: 0;
  }

  .status-footer .result-actions .button {
    width: 2.35rem;
    min-width: 2.35rem;
  }

  .button {
    min-height: 2rem;
    max-width: 100%;
  }

  .new-hero-actions .button {
    min-height: 3.2rem;
    font-size: 1rem;
  }

  .new-benefit-list {
    display: grid;
    gap: 0.5rem;
  }

  .new-tariff-strip {
    grid-template-columns: 1fr;
    padding: 0.85rem;
  }

  .new-hero-visual {
    min-height: auto;
    padding: 0;
  }

  .new-transcript-card {
    width: 100%;
    padding: 1rem;
  }

  .new-process-card {
    position: static;
    width: 100%;
    margin-top: 0.8rem;
  }

  .new-feature-grid,
  .new-price-grid,
  .new-step-grid {
    grid-template-columns: 1fr;
  }

  .file-trigger {
    align-items: stretch;
    flex-direction: column;
  }

  .file-trigger-text {
    width: 100%;
    text-align: center;
  }

  .job-summary {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 430px) {
  .new-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .new-mobile-menu {
    order: 2;
  }

  .new-mobile-menu-panel {
    right: 0;
    left: auto;
  }

  .new-auth {
    grid-column: auto;
    justify-self: stretch;
  }

  .new-auth .auth-actions {
    justify-content: flex-end;
  }

  #tg-login {
    justify-content: flex-start;
  }

  .new-pill {
    width: 100%;
    border-radius: 10px;
  }

  .new-hero h1 {
    font-size: clamp(2.18rem, 13vw, 2.85rem);
  }

  .new-transcript-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .new-status-pill {
    grid-column: 1 / -1;
    width: max-content;
  }

  .new-transcript-lines p {
    font-size: 0.84rem;
  }
}

@media (max-width: 340px) {
  .new-main {
    padding-right: 0.65rem;
    padding-left: 0.65rem;
  }

  .new-header {
    padding-right: 0.65rem;
    padding-left: 0.65rem;
  }

  .new-brand {
    font-size: 1.05rem;
  }

  .new-hero h1 {
    font-size: 2.08rem;
  }

  .new-transcript-card,
  .new-process-card,
  .new-tariff-strip,
  .new-feature-grid article,
  .new-price-grid article,
  .new-step-grid article,
  .faq-list details {
    border-radius: 10px;
  }
}

@media (max-width: 760px) {
  .cookie-banner {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
    width: auto;
    padding: 0.65rem 0.75rem;
    gap: 0.65rem;
  }

  .cookie-banner p {
    font-size: 0.76rem;
    line-height: 1.3;
  }

  .cookie-banner-actions {
    gap: 0.5rem;
    white-space: nowrap;
  }

  .cookie-banner-actions a {
    font-size: 0.76rem;
  }

  .cookie-banner-actions .button {
    min-height: 2.35rem;
    padding: 0.45rem 0.65rem;
  }
}

@media (max-width: 720px) {
  .transcription-options {
    grid-template-columns: 1fr;
  }

  .site-footer {
    margin-top: 2.5rem;
  }

  .site-footer-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-header {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback-upload-control {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .feedback-upload-action {
    grid-column: 1 / -1;
    text-align: center;
  }
}

@media (max-width: 720px) {
  .legacy-plan-modal {
    place-items: end center;
    padding: 0;
  }

  .legacy-plan-modal-panel {
    width: 100%;
    max-height: 90vh;
    padding: 1.15rem;
    border-radius: 18px 18px 0 0;
  }

  .legacy-plan-grid {
    grid-template-columns: 1fr;
  }

  .legacy-plan-card {
    padding: 0.9rem;
  }
}

@media (max-width: 980px) { .pricing-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (max-width: 620px) { .pricing-plan-grid { grid-template-columns: 1fr; } .new-price-grid .pricing-plan { min-height: 0; } }
