/* Revelation Lab — Mobile Level 1 Stylesheet */

@media (max-width: 767px) {
  /* Task 2: Prevent iOS auto-zoom (<16px triggers zoom) and enforce touch targets */
  input, select, textarea {
    font-size: 16px !important;
    min-height: 44px;
  }

  button, .nav-item {
    min-height: 44px;
  }

  /* Table inputs: ensure readable font */
  table input {
    font-size: 16px !important;
  }

  /* Task 3: Recipe Creator — transform table rows into clean cards */
  #rc-phases table,
  #rc-phases tbody,
  #rc-phases tr,
  #rc-phases td {
    display: block;
    width: 100%;
  }

  #rc-phases thead {
    display: none;
  }

  #rc-phases tr {
    background-color: rgba(15, 23, 42, 0.7);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }

  #rc-phases td {
    padding: 5px 0;
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: center;
    border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  }

  #rc-phases td:last-child {
    border-bottom: none;
    display: flex;
    justify-content: flex-end;
    padding-top: 6px;
  }

  #rc-phases td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  #rc-phases td[data-label="Action"]::before {
    display: none;
  }

  /* Styling row inputs inside mobile cards */
  #rc-phases td input {
    background-color: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    padding: 6px 10px !important;
    color: #f8fafc;
    width: 100%;
  }

  #rc-phases td input:focus {
    border-color: #3b5bdb !important;
    outline: none;
  }

  #rc-phases td input[readonly] {
    background-color: transparent !important;
    border-color: transparent !important;
  }

  /* Remove table horizontal scroll clipping on mobile cards */
  #rc-phases .overflow-x-auto {
    overflow-x: visible;
  }

  /* Bottom Navigation active states */
  .bottom-nav-item {
    transition: all 0.15s ease;
  }

  .bottom-nav-item.active {
    color: #38bdf8 !important;
  }

  .bottom-nav-item.active span:first-child {
    transform: scale(1.12);
  }
}
