/* Tablet and mobile layout for the Angular calendar-sync app. */
.app-logo {
  display: flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 7px;
  background: transparent;
}

.app-logo img {
  display: block;
  width: 142px;
  height: auto;
}

.modal-logo {
  display: flex;
  justify-content: center;
  margin: 0 auto 18px;
}

.modal-logo img {
  display: block;
  width: 142px;
  height: auto;
}

.modal-privacy {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  align-items: start;
  margin: 0 0 18px;
  padding: 11px 12px;
  border: 1px solid var(--app-border-strong);
  border-radius: 9px;
  background: var(--app-accent-soft);
}

.modal-privacy > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--app-surface);
  color: var(--app-accent);
  font-size: 17px;
}

.email-modal .modal-privacy p {
  margin: 0;
  color: var(--app-text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.modal-privacy strong {
  color: var(--app-text);
}

.email-modal label {
  gap: 8px;
  font-size: 13px;
}

.app-shell .email-modal input {
  min-height: 52px;
  padding: 14px;
  border: 2px solid var(--app-border-strong);
  border-radius: 10px;
  background: var(--app-surface-raised);
  color: var(--app-text);
  box-shadow: 0 2px 7px rgba(38, 72, 150, .08);
  font-size: 16px;
  font-weight: 600;
}

.app-shell .email-modal input:focus {
  border-color: var(--app-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--app-accent) 18%, transparent);
}

.app-shell .email-modal input:-webkit-autofill,
.app-shell .email-modal input:-webkit-autofill:hover,
.app-shell .email-modal input:autofill {
  color: var(--app-text);
  -webkit-text-fill-color: var(--app-text);
  caret-color: var(--app-text);
  border-color: var(--app-border-strong);
  box-shadow: 0 0 0 1000px var(--app-surface-raised) inset;
}

.app-shell .email-modal input:-webkit-autofill:focus {
  border-color: var(--app-accent);
  box-shadow: 0 0 0 1000px var(--app-surface-raised) inset,
    0 0 0 4px color-mix(in srgb, var(--app-accent) 18%, transparent);
}

@media (min-width: 851px) and (max-width: 1120px) {
  .demo-page { max-width: 880px; padding-inline: 28px; }
  .sync-layout { grid-template-columns: minmax(210px, 1fr) minmax(255px, 1.08fr); gap: 20px; }
  .target-column { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; align-items: start; }
  .compact-card .provider-head { padding: 17px; }
  .compact-card .busy-list { padding: 11px; }
  .compact-card .busy-list > div { padding: 9px; }
  .privacy-note { margin-top: 24px; }
}

@media (max-width: 850px) {
  .app-header { min-height: 58px; height: auto; padding: 9px 16px; gap: 12px; position: sticky; top: 0; z-index: 10; }
  .app-nav { overflow-x: auto; scrollbar-width: none; flex: 1; }
  .app-nav::-webkit-scrollbar { display: none; }
  .app-nav button { min-height: 38px; white-space: nowrap; }
  .header-cta { min-height: 38px; }
  .workspace-head h1 { font-size: 27px; }
  .workspace-head p { max-width: 620px; }
  .stepper { overflow-x: auto; padding-bottom: 16px; }
  .step { white-space: nowrap; }
  .calendar-card, .sync-card { box-shadow: none; }
  .sync-card { max-width: 520px; width: 100%; justify-self: center; }
  .privacy-note { max-width: 650px; margin-inline: auto; }
  .privacy-note button { min-height: 42px; }
  .agents-page { max-width: 680px; }
  .agent-card { padding: 22px; }
}

@media (max-width: 640px) {
  .demo-page { padding: 31px 16px 56px; }
  .brand { flex: 0 0 auto; }
  .app-logo { padding: 3px 5px; }
  .app-logo img { width: 123px; }
  .app-header { gap: 10px; }
  .header-cta { display: none; }
  .theme-switch { min-width: 38px; width: 38px; padding: 0; justify-content: center; }
  .settings-button { width: 38px; height: 38px; }
  .theme-switch span:last-child { display: none; }
  .app-nav { gap: 2px; }
  .app-nav button { padding: 8px 9px; font-size: 12px; }
  .workspace-head { margin-bottom: 20px; gap: 11px; }
  .workspace-head h1, .empty-page h1 { font-size: 25px; }
  .workspace-head p, .empty-page p { font-size: 14px; }
  .quiet-button { padding: 0; color: #c7c9d1; }
  .stepper { justify-content: flex-start; gap: 7px; margin-bottom: 20px; }
  .stepper > span { width: 18px; flex: 0 0 18px; }
  .step { font-size: 11px; gap: 5px; }
  .step b { height: 19px; width: 19px; }
  .sync-layout { gap: 16px; }
  .calendar-card .provider-head { padding: 14px; }
  .event-stack, .busy-list { padding: 9px; }
  .event { padding: 10px 8px; }
  .target-column { gap: 12px; }
  .sync-card { padding: 22px 17px; }
  .sync-card h2 { font-size: 19px; }
  .sync-card ul { font-size: 12px; }
  .direction-toggle button { min-height: 34px; }
  .preview-button, .primary-button { min-height: 44px; }
  .privacy-note { padding-top: 17px; gap: 10px; }
  .privacy-note p { flex-basis: calc(100% - 42px); font-size: 12px; }
  .privacy-note button { width: 100%; margin: 3px 0 0; }
  .home-hero { padding: 42px 0 35px; }
  .home-hero h1 { font-size: 37px; line-height: 1.05; }
  .home-hero p { font-size: 15px; }
  .home-stats { display: grid; grid-template-columns: 1fr auto 1fr; padding: 18px; gap: 15px 10px; text-align: left; }
  .home-stats div:nth-of-type(3) { grid-column: 1 / -1; justify-self: center; text-align: center; }
  .home-stats .sync-line:last-of-type { display: none; }
  .empty-page { padding-top: 105px; }
  .agents-page { padding-top: 48px; }
  .agents-page h1 { font-size: 31px; }
  .agent-card { padding: 19px; }
  .email-modal { padding: 27px 20px 22px; }
  .email-modal h2 { font-size: 25px; }
}

@media (max-width: 390px) {
  .app-nav button { padding-inline: 7px; }
  .stepper > span { width: 10px; flex-basis: 10px; }
  .step:not(.active) { color: #858792; }
  .step:not(.active) b { display: none; }
  .home-stats { grid-template-columns: 1fr; text-align: center; }
  .home-stats div { justify-self: center; }
  .home-stats .sync-line { display: none; }
}

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