/**
 * MOBILE RESPONSIVE CSS
 * Direct mobile-first responsive design
 * Overrides desktop styles for mobile devices
 */

/* ===== MOBILE DEVICES (768px and below) ===== */
@media (max-width: 768px) {
  
  /* SIDEBAR - Convert to overlay */
  .sidebar {
    position: fixed !important;
    width: 280px !important;
    left: -280px !important;
    margin-left: 0 !important;
    z-index: 998 !important;
    transition: left 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  }

  .sidebar.active {
    left: 0 !important;
  }

  /* MAIN CONTENT - Full width */
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding-top: 60px !important;
  }

  /* APP CARD */
  .app-card {
    margin: 0.75rem !important;
    border-radius: 20px !important;
    padding: 0.75rem !important;
  }

  /* TYPOGRAPHY */
  .title {
    font-size: 1.6rem !important;
    margin: 0.75rem 0 !important;
  }

  .subtitle {
    font-size: 0.95rem !important;
  }

  /* BUTTONS - Stack vertically */
  .recording-controls {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  .btn-start,
  .btn-stop,
  .btn-clear,
  .btn-download {
    width: 100% !important;
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    border-radius: 14px !important;
    height: auto !important;
    min-height: 44px !important;
  }

  /* ACTION BUTTONS - 2 column */
  .action-buttons-section .d-flex {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  .btn-action {
    flex: 1 1 calc(50% - 0.25rem) !important;
    min-width: 120px !important;
    max-width: 100% !important;
    padding: 10px 8px !important;
    font-size: 0.8rem !important;
    min-height: 52px !important;
  }

  /* INPUT FIELDS */
  .form-select,
  md-input-container input {
    padding: 10px 12px !important;
    font-size: 16px !important;
    border-radius: 10px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  /* MODALS */
  md-dialog {
    width: 95vw !important;
    max-width: 95vw !important;
    margin: auto !important;
    border-radius: 18px !important;
    z-index: 10000 !important;
  }

  md-dialog-content {
    padding: 1.2rem 1rem !important;
  }

  /* AUDIO PLAYERS */
  #audioPlayer,
  #uploadAudioPlayer {
    height: 42px !important;
    border-radius: 10px !important;
  }

  /* SIDEBAR TEXT VISIBLE */
  .logo-text,
  .nav-text {
    display: inline !important;
  }

  .sidebar-user-section {
    display: block !important;
  }

  .footer-brand {
    display: block !important;
  }

  /* FORM FIELDS */
  .field input {
    padding: 10px 12px !important;
    font-size: 16px !important;
    height: 44px !important;
    border-radius: 10px !important;
  }

  .field label {
    font-size: 12px !important;
  }

  /* OUTPUT TEXT */
  .output-text {
    min-height: 90px !important;
    font-size: 0.9rem !important;
  }

  .output-label {
    font-size: 0.95rem !important;
  }

  /* SECTIONS */
  .language-selector,
  .output-section {
    border-radius: 14px !important;
    padding: 0.9rem !important;
    margin-bottom: 0.9rem !important;
  }

  .recording-indicator {
    padding: 0.7rem !important;
    border-radius: 14px !important;
  }

}

/* ===== SMALL MOBILE (480px and below) ===== */
@media (max-width: 480px) {

  /* SIDEBAR */
  .sidebar {
    width: 100% !important;
  }

  /* MAIN CONTENT */
  .main-content {
    padding-top: 50px !important;
  }

  /* TYPOGRAPHY */
  .title {
    font-size: 1.4rem !important;
  }

  /* BUTTONS */
  .btn-start,
  .btn-stop,
  .btn-clear {
    padding: 10px 14px !important;
    font-size: 0.85rem !important;
    height: 40px !important;
  }

  /* ACTION BUTTONS */
  .action-buttons-section .d-flex {
    gap: 0.4rem !important;
  }

  .btn-action {
    flex: 1 1 calc(50% - 0.2rem) !important;
    min-width: 100px !important;
    padding: 8px 6px !important;
    font-size: 0.7rem !important;
    min-height: 48px !important;
  }

  /* FORM FIELDS */
  md-input-container input,
  .form-select {
    padding: 8px 10px !important;
    font-size: 15px !important;
    height: 40px !important;
  }

  /* MODALS */
  md-dialog {
    width: 98vw !important;
    max-width: 98vw !important;
  }

  md-dialog-content {
    padding: 0.9rem 0.75rem !important;
  }

  /* SIDEBAR ELEMENTS */
  .logo-text {
    display: none !important;
  }

  .nav-text {
    display: none !important;
  }

  .sidebar-user-section {
    display: none !important;
  }

  /* TEXT */
  .output-text {
    font-size: 0.85rem !important;
  }

  /* AUDIO */
  #audioPlayer,
  #uploadAudioPlayer {
    height: 38px !important;
  }

}

/* ===== EXTRA SMALL (360px and below) ===== */
@media (max-width: 360px) {

  .title {
    font-size: 1.2rem !important;
  }

  .btn-action {
    min-width: 85px !important;
    min-height: 44px !important;
  }

}

/* ===== LANDSCAPE MODE ===== */
@media (max-height: 500px) and (orientation: landscape) {

  .main-content {
    padding-top: 40px !important;
  }

  .title {
    margin: 0.25rem 0 !important;
  }

  .recording-controls,
  .action-buttons-section .d-flex {
    gap: 0.3rem !important;
  }

  .btn-start,
  .btn-stop,
  .btn-clear,
  .btn-action {
    min-height: 38px !important;
    padding: 6px 10px !important;
  }

  .output-section {
    margin-bottom: 0.5rem !important;
  }

  .output-text {
    min-height: 60px !important;
  }

}
