/* === Dr. Promptshake v7.5.2 — Responsive === */

@media (max-width: 600px) {
  /* Login */
  .login-box { padding: 40px 20px; width: 90%; max-width: 360px; }
  .login-logo { width: 120px; height: 120px; }

  /* App shell */
  .app-container {
    padding: 15px 10px;
    width: 100% !important;
    box-sizing: border-box;
  }
  .header { margin-bottom: 15px; }
  .brain-logo { width: 110px; height: 110px; margin: -25px -5px -25px 0; }
  .app-title { font-size: 16px; }
  .menu-dots { font-size: 32px; }

  /* Tabs */
  .nav-tabs { gap: 4px; padding: 4px; width: 100%; justify-content: space-around; }
  .tab { padding: 10px 5px; font-size: 12px; flex: 1; text-align: center; }

  /* Note editor — mobile: pill shape */
  .note-editor {
    padding: 0 6px 0 0 !important;
    gap: 0;
    border-radius: 24px;
    align-items: center !important;
    min-height: 52px;
  }

  .note-editor textarea {
    min-height: 52px !important;
    font-size: 16px;
    padding: 14px 8px 14px 20px !important;
    line-height: 24px;
  }

  .note-editor textarea::placeholder {
    line-height: 24px;
  }

  .note-editor .btn-send {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 50% !important;
    flex-shrink: 0;
  }

  .note-editor .actions {
    align-self: center !important;
    padding-right: 2px;
  }

  /* Notes list */
  .notes-list {
    padding: 16px 16px !important;
    width: 100% !important;
  }

  .notes-list h3 {
    padding-left: 4px;
  }

  #dayNotesPlaceholder {
    padding: 8px 4px !important;
  }

  .note-card {
    padding: 14px 12px;
  }

  /* Calendar — mobile */
  .calendar-container {
    padding: 16px 12px;
  }

  .calendar-header h3 {
    font-size: 16px;
  }

  .calendar-day {
    font-size: 13px;
    border-radius: 8px;
  }

  .calendar-weekday {
    font-size: 11px;
  }

  /* Teczki — mobile */
  .teczki-card {
    padding: 16px 18px;
  }

  .teczki-card-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  /* Chat modal — fullscreen on mobile */
  .chat-overlay {
    padding: 0 !important;
    background: #0a0a0a !important;
  }
  .chat-container {
    height: 100vh;
    height: 100dvh;
    width: 100%;
    margin: 0;
    border-radius: 0;
    border: none;
    background: var(--bg-secondary);
    overscroll-behavior: none;
  }

  /* CHAT_HEADER mobile */
  .chat-header { padding: 10px 16px; }
  .chat-header h2 { font-size: 17px; }
  .chat-header img {
    width: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    border-radius: 8px !important;
  }

  /* CHAT_MESSAGES mobile */
  .chat-messages { padding: 10px; gap: 10px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }

  /* MESSAGE_BUBBLE mobile */
  .message-bubble { max-width: 88%; font-size: 16px; line-height: 1.45; border-radius: 10px; }

  /* CHAT_INPUT_CONTAINER mobile */
  .chat-input-container { padding: 10px 12px; }

  .chat-input-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    padding: 4px 10px !important;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
  }

  .chat-input {
    font-size: 16px;
    padding: 10px 4px !important;
    min-height: 40px !important;
    max-height: 120px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    line-height: 1.4;
  }

  .chat-input:focus { box-shadow: none !important; }

  .chat-send-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    margin: 0 !important;
    align-self: center;
  }

  /* ACTION_BAR mobile */
  .chat-action-bar.visible {
    max-height: 68px;
    padding: 0 4px;
  }

  .action-bar-btn { height: 68px; }
  .action-bar-btn svg { width: 28px; height: 28px; }

  /* AI_LOADER mobile — border-radius 0 na fullscreen */
  .ai-loader-overlay { border-radius: 0; }

  /* Week view (legacy) */
  .week-panel { flex-direction: column; }
  .week-days-list {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    display: flex;
    overflow-x: auto;
    padding: 10px 5px;
  }

  /* Edit panel */
  .edit-panel { padding: 24px 20px; margin: 2vh auto; }
}

/* Extra small — login box tighter */
@media (max-width: 380px) {
  .login-box { padding: 32px 16px; max-width: 320px; }
  .login-logo { width: 100px; height: 100px; }
  .login-box h1 { font-size: 22px; }
}

/* Tablet */
@media (min-width: 601px) and (max-width: 1024px) {
  .teczki-grid {
    grid-template-columns: 1fr 1fr;
  }

  .calendar-container {
    padding: 24px;
  }
}

/* Desktop */
@media (min-width: 1025px) {
  .teczki-grid {
    grid-template-columns: 1fr 1fr;
  }
}
