/* Star Sailors Charakter-Seite – kompakte ID-Karte / Profil
   Layout: Icon links, Name und Badges rechts, Trennlinie unten */

/* Charakter-Info: Icon links, Text rechts */
.starsailors-character-page .character-summary {
  margin-bottom: 12px;
}
.starsailors-character-page .character-header.starsailors-header-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
  flex-wrap: nowrap;
  padding: 0;
  background: transparent;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(50, 50, 62, 0.6);
  padding-bottom: 12px;
}
.starsailors-header-row .character-details {
  flex: 1 1 auto;
  min-width: 0;
}
.starsailors-character-page .character-info {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
}
.starsailors-character-page .character-info .character-portrait,
.starsailors-character-page .character-info .character-portrait--icon {
  flex: 0 0 auto;
  order: 1;
}
.starsailors-character-page .character-info .character-title-row {
  flex: 1 1 auto;
  min-width: 0;
  order: 2;
}
.starsailors-character-page .character-title-row {
  gap: 8px;
  flex-direction: column;
  align-items: flex-start;
}
.starsailors-character-page .character-title-row h2 {
  font-size: 1.81rem;
  line-height: 1.2;
  margin: 0;
}
.starsailors-character-page .character-title-row .character-badges {
  gap: 8px;
  padding: 0;
}
.starsailors-character-page .character-title-row .character-badges .character-tag {
  font-size: 1.375rem;
  padding: 2.5px 10px;
}
.starsailors-character-page .character-profile {
  margin-top: 12px;
}
.starsailors-character-page .tab-nav {
  margin-top: 12px;
  margin-bottom: 12px;
}

/* Character tag icons – ensure visibility (25% größer im title-row) */
.starsailors-character-page .character-title-row .character-tag-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

/* Badge-Farben: Tier 1 = Grau, Tier 2 = SR Lila, Tier 3 = SSR Gold */
.starsailors-character-page .character-tag.badge-tier-1 {
  color: #6b7280;
}
.starsailors-character-page .character-tag.badge-tier-2 {
  color: #7a5af8;
}
.starsailors-character-page .character-tag.badge-tier-3 {
  color: #e0c870;
}

/* Tier-Liste Badge-Hintergrundfarben (wie Tier List) */
.starsailors-character-page .character-tag.badge-tierlist-t0 {
  background: #d32f2f !important;
  color: #fff !important;
}
.starsailors-character-page .character-tag.badge-tierlist-ss {
  background: #ec6563 !important;
  color: #fff !important;
}
.starsailors-character-page .character-tag.badge-tierlist-s {
  background: #ff7f7f !important;
  color: #fff !important;
}
.starsailors-character-page .character-tag.badge-tierlist-a {
  background: #f9a2a2 !important;
  color: #222 !important;
}
.starsailors-character-page .character-tag.badge-tierlist-b {
  background: #ffbf7f !important;
  color: #222 !important;
}
.starsailors-character-page .character-tag.badge-tierlist-c {
  background: #ffff7f !important;
  color: #222 !important;
}
.starsailors-character-page .character-tag.badge-tierlist-d {
  background: linear-gradient(135deg, #bfff7f 0%, #81c784 100%) !important;
  color: #222 !important;
}

/* Profil-Tab: Grid nutzt volle Inhaltsbreite */
.starsailors-character-page [data-tab-panel="profile"] .profile-grid {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
}

.starsailors-character-page .character-portrait--icon {
  /* ID-Card: Icon links, ~60px wie Skizze */
  aspect-ratio: 1 / 1;
  width: 120px;
  height: 120px;
  flex: 0 0 60px;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
}

/* skill-type: gleiche Größe wie skill-badge */
.starsailors-character-page .skill-type {
  padding: 8px 12px;
}

@media (max-width: 768px) {
  /* Status-Einträge: volle Container-Breite */
  .starsailors-character-page .status-grid {
    grid-template-columns: 1fr;
  }

  .starsailors-character-page .character-info {
    flex-wrap: wrap;
    flex-direction: row;
  }
  .starsailors-character-page .character-info .character-portrait,
  .starsailors-character-page .character-info .character-portrait--icon {
    order: 1;
  }
  .starsailors-character-page .character-info .character-title-row {
    order: 2;
  }

  /* Skill-Zusammenfassung: im Container, ohne Overflow */
  .starsailors-character-page {
    min-width: 0;
    max-width: 100%;
  }
  .starsailors-character-page .skill-card {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }
  .starsailors-character-page .skill-header {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .starsailors-character-page .skill-summary,
  .starsailors-character-page .skill-title-row {
    display: contents;
  }
  .starsailors-character-page .skill-summary {
    min-width: 0;
    max-width: 100%;
  }
  .starsailors-character-page .skill-title-row {
    min-width: 0;
  }
  .starsailors-character-page .skill-name {
    order: 1;
    flex: 0 0 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .starsailors-character-page .skill-type {
    order: 2;
    flex: 0 0 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .starsailors-character-page .skill-badge {
    order: 3;
    align-self: center;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .starsailors-character-page .skill-icon {
    order: 4;
    margin-left: 0;
  }
  .starsailors-character-page .skill-name,
  .starsailors-character-page .skill-type {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    width: 100%;
  }
}

/* Skill-Keywords – unter Skill-Beschreibung, innerhalb der Skill-Karte */
.skill-keywords {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(50, 50, 62, 0.6);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-keyword {
  font-size: 0.95rem;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-keyword-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.skill-keyword-effect {
  font-weight: 600;
  color: #7a5af8;
}

.skill-keyword-desc {
  color: #a0a0a0;
}

/* Build section – Gear and Memory Pieces */
.build-section h3 {
  font-size: 1.15rem;
  color: #e6e6e6;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.build-subsection {
  margin-bottom: 24px;
}
.build-subsection:last-child {
  margin-bottom: 0;
}
.build-gear-grid,
.build-memory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 12px;
}
.build-gear-group {
  margin-top: 20px;
}
.build-alt-label {
  font-size: 1rem;
  color: #b8b8b8;
  margin: 0 0 8px 0;
}
.build-gear-mode-label {
  font-size: 0.95rem;
  color: #d1d1d1;
  margin: 0 0 8px 0;
}
.build-gear-stats {
  margin-bottom: 12px;
}
.build-gear-stat {
  font-size: 0.9rem;
  color: #b8b8b8;
  margin: 0 0 4px 0;
}
.build-gear-stat-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin-left: 6px;
}
.build-gear-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.build-gear-stat-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
}
.build-gear-card.gear-set-card,
.starsailors-character-page .gear-set-card {
  background: #1c1d21;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.build-gear-card .gear-set-icon,
.starsailors-character-page .gear-set-icon {
  padding: 8px;
  background: #1c1d21;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  margin: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}
.build-gear-card img,
.starsailors-character-page .gear-set-card img {
  max-width: 100%;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
  display: block;
}
.build-gear-card .gear-set-name,
.starsailors-character-page .gear-set-name {
  margin: 12px 16px 8px;
  font-size: 1.2rem;
  color: #e6e6e6;
}
.build-gear-card .gear-bonus,
.starsailors-character-page .gear-bonus {
  margin: 0 16px 12px;
  font-size: 0.9rem;
  color: #d1d1d1;
  line-height: 1.4;
}
.build-gear-card .gear-bonus:last-child,
.starsailors-character-page .gear-bonus:last-child {
  margin-bottom: 16px;
}
.build-gear-card .gear-bonus-2pc,
.starsailors-character-page .gear-bonus-2pc {
  color: #e07c3c;
}
.build-gear-card .gear-bonus-4pc,
.starsailors-character-page .gear-bonus-4pc {
  color: #c94a4a;
}
.build-memory-card {
  background: #1c1d21;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px;
}
.build-memory-card .memory-piece-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  margin-bottom: 12px;
}
.build-memory-card .memory-piece-icon img {
  max-width: 100%;
  max-height: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
}
.build-memory-card .memory-piece-name {
  margin: 0 0 6px 0;
  font-size: 1.1rem;
  color: #e6e6e6;
}
.build-memory-card .memory-piece-meta {
  margin: 0;
  font-size: 0.9rem;
  color: #b8b8b8;
}
