/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* ログインフォーム */
.form-signin {
  max-width: 360px;
  margin-inline: auto;
  padding-block: 1rem;
}

.form-signin .form-control {
  margin-bottom: 0.5rem;
}

/* フォームテーブルのスマホ対応 */
@media (width < 576px) {
  table.table:not(.teams-table):not(.list-table) th,
  table.table:not(.teams-table):not(.list-table) td {
    display: block;
    width: 100% !important;
  }
}

/* リーグヘッダーのsticky（狭い幅のみ） */
@media (width < 768px) {
  .league-header {
    position: sticky;
    top: 58px;
    background-color: var(--bs-body-bg);
    z-index: 10;
    padding-block: 0.5rem;
  }
}

/* 登録チーム一覧テーブルのスマホ対応 */
@media (width < 768px) {
  .teams-table thead {
    display: none;
  }

  .teams-table tbody tr {
    display: block;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    margin-block-end: 0.75rem;
    padding-block: 0.25rem;
  }

  .teams-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    padding-inline: 0.75rem;
    padding-block: 0.25rem;
  }

  .teams-table tbody td:empty {
    display: none;
  }

  .teams-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    flex-shrink: 0;
    margin-inline-end: 1rem;
  }
}
