/*
 * 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-label {font-weight: 500}
em {font-weight: 500; font-style: normal;}
a {text-decoration: none}
dt {font-weight: 600;}
table th {font-weight: 500; opacity: 0.8;}
strong {font-weight: 600;}
.readme p:last-child {margin-bottom: 0}


.items-table tr > *             {text-align: right;}
.items-table tr > :nth-child(2) {text-align: left;}
.items-table tr > :nth-child(1) img {}


.items-table .item-title {line-height: 1em; display: block;}
.items-table .item-title div {color: #999; font-size: 0.7rem;}


.items-table {table-layout: fixed;}
.items-table th,
.items-table td:nth-child(2) {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}

.items-table th:nth-child(1) { width: 40px; }
.items-table th:nth-child(3) { width: 6rem; }
.items-table th:nth-child(4) { width: 6rem; }
.items-table.hide-2nd tr > :nth-child(3) { display: none;}

@media (max-width: 767px) {
 .items-table { font-size: 0.85em; }
  .items-table tr > :nth-child(3) { width: 4.5rem;}
  .items-table tr > :nth-child(4) { width: 5rem;}
  .items-table td img {max-width: 24px; max-height: 24px;}
}

.items-table .item-icon {display: inline-block; margin-right: 0.2rem; text-align: center;}
.items-table .item-icon img      {max-height: 100%; max-width: 100%; object-fit: contain;}

.items-grid {display: grid; grid-template-columns: repeat(auto-fill, 180px); gap: 0rem;}
.items-grid .item > :hover {background: #F8F8F8;}
.items-grid .item img      {max-height: 100%; max-width: 100%; object-fit: contain;}
.items-grid .item .justify-content-center {height: 120px; margin-bottom: 10px; }

.item-props-panel {margin-left: 1rem; font-size: 0.875rem;}
.item-props-panel,
.item-props-panel > * {width: 360px;}
.item-props-panel dl {display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.75rem;}
.item-props-panel dt {margin: 0;}
.item-props-panel dd {margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}

/* For smaller screens, make items thinner; make properties panel thinner */
@media (max-width: 992px) {
  .items-grid {grid-template-columns: repeat(auto-fill, 120px);}
  .items-grid .item .justify-content-center {height: 80px; margin-bottom: 6px;}
  .item-props-panel, .item-props-panel > * {width: 280px;}
}

/* For smallest screens, move properties panel to be full-width and above the content */
@media (max-width: 767px) {
  .item-props-panel {margin-bottom: 1rem; margin-left: 0;}
  .item-props-panel, .item-props-panel > * {width: 100%;}
}

/* Inline Edit Status */
.inline-edit-status {
  position: absolute;
  top: 0.5em;
  right: 0.5em;
  font-size: 0.75rem;
  color: #666;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  z-index: 1;
}
.inline-edit-status:empty { display: none; }
.inline-edit-status--saved {
  color: #198754;
  animation: fade-to-gray 10s ease-out forwards;
}
.inline-edit-status--error { color: #dc3545; }

@keyframes fade-to-gray {
  0% { color: #198754; }
  100% { color: #999; }
}

/* Global Audio Player */
.global-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: #222;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  z-index: 1050;
}
.global-player.hidden { display: none; }
.global-player audio { display: none; }
body.has-global-player { padding-bottom: 48px; }

.global-player-btn {
  background: #333;
  border: 1px solid #444;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
.global-player-btn:hover { background: #444; }
.global-player-btn.play-btn { width: 40px; }

.global-player-track {
  color: #ccc;
  font-size: 14px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-player-progress {
  flex: 2;
  height: 6px;
  background: #444;
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
}
.global-player-progress-bar {
  height: 100%;
  background: #0d6efd;
  width: 0;
  transition: width 0.1s linear;
}

.global-player-close {
  background: none;
  border: none;
  color: #666;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}
.global-player-close:hover { color: #f66; }

@media (max-width: 576px) {
  .global-player { padding: 0 8px; gap: 6px; }
  .global-player-btn { width: 28px; height: 28px; font-size: 12px; }
  .global-player-btn.play-btn { width: 34px; }
  .global-player-track { font-size: 12px; }
}

