/* AI_TAG: FRONTEND_COMPONENT | Pigeon detail modal styling */

/* ======================================
   MODAL BASE
   ====================================== */

.pigeon-detail-modal .modal-large {
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* ======================================
   MODAL BODY LAYOUT
   ====================================== */

.pigeon-detail-body {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 30px;
  padding: 20px;
}

/* ======================================
   LEFT COLUMN
   ====================================== */

.pigeon-detail-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pigeon-detail-avatar {
  position: relative;
  width: 100%;
  height: 200px;
  background: var(--bg-secondary, #f5f5f5);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pigeon-icon-large {
  font-size: 8em;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.pigeon-level-badge {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: var(--color-xp, #9b59b6);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 1em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.pigeon-basic-info {
  background: var(--bg-secondary, #f5f5f5);
  border-radius: 8px;
  padding: 15px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color, #ddd);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: var(--text-secondary, #666);
}

.info-value {
  font-weight: 500;
  color: var(--text-primary, #333);
}

.info-value.status-home,
.info-value.status-resting {
  color: #27ae60;
}

.info-value.status-flying {
  color: #3498db;
}

.info-value.status-training {
  color: #9b59b6;
}

.info-value.status-breeding {
  color: #e91e63;
}

.info-value.status-retired {
  color: #95a5a6;
}

/* ======================================
   CONDITION BARS (DETAIL)
   ====================================== */

.pigeon-conditions-detail h3 {
  margin: 0 0 15px 0;
  font-size: 1.1em;
  color: var(--text-primary, #333);
}

.condition-bar-detail {
  margin-bottom: 12px;
}

.condition-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.condition-icon {
  font-size: 1.2em;
}

.condition-label {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary, #333);
}

.condition-value {
  font-weight: bold;
  color: var(--text-primary, #333);
  min-width: 40px;
  text-align: right;
}

.condition-track-large {
  height: 12px;
  background: var(--bg-tertiary, #eee);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.condition-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.3s;
}

/* ======================================
   QUICK ACTIONS
   ====================================== */

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-btn {
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1em;
}

.feed-btn {
  background: #f39c12;
  color: white;
}

.feed-btn:hover {
  background: #e67e22;
  transform: translateY(-2px);
}

.rest-btn {
  background: #3498db;
  color: white;
}

.rest-btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
}

.rename-btn {
  background: var(--bg-secondary, #f5f5f5);
  color: var(--text-primary, #333);
  border: 2px solid var(--border-color, #ddd);
}

.rename-btn:hover {
  background: var(--bg-hover, #e8e8e8);
  transform: translateY(-2px);
}

/* ======================================
   RIGHT COLUMN
   ====================================== */

.pigeon-detail-right {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.pigeon-personality-section,
.pigeon-stats-section,
.pigeon-traits-section,
.pigeon-lineage-section {
  background: var(--bg-secondary, #f9f9f9);
  padding: 15px;
  border-radius: 8px;
}

.pigeon-personality-section h3,
.pigeon-stats-section h3,
.pigeon-traits-section h3,
.pigeon-lineage-section h3 {
  margin: 0 0 15px 0;
  font-size: 1.1em;
  color: var(--text-primary, #333);
  border-bottom: 2px solid var(--border-color, #ddd);
  padding-bottom: 8px;
}

/* ======================================
   PERSONALITY SECTION
   ====================================== */

.personality-description {
  margin: 10px 0 15px 0;
  padding: 10px;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(155, 89, 182, 0.1));
  border-left: 4px solid #3498db;
  border-radius: 4px;
  font-style: italic;
  color: var(--text-secondary, #666);
}

.personality-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.personality-stat {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  border: 1px solid var(--border-color, #e0e0e0);
}

.personality-stat-label {
  font-size: 0.8em;
  color: var(--text-secondary, #666);
  margin-bottom: 4px;
}

.personality-stat-value {
  font-size: 1em;
  font-weight: 600;
  color: var(--text-primary, #333);
}

/* ======================================
   STAT BARS
   ====================================== */

.stat-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.stat-icon {
  font-size: 1.2em;
}

/* Personality SVG chip icons in detail */
.pi-chip{ display:inline-block; vertical-align:middle; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.pi-icon{ display:inline-block; vertical-align:middle; }

.stat-label {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary, #333);
}

.stat-value {
  font-weight: bold;
  color: var(--text-primary, #333);
  min-width: 35px;
  text-align: right;
}

.stat-track {
  height: 10px;
  background: var(--bg-tertiary, #eee);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  border-radius: 5px;
  transition: width 0.3s;
}

/* ======================================
   TRAITS
   ====================================== */

.traits-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trait-card {
  background: var(--bg-secondary, #f5f5f5);
  border-radius: 6px;
  padding: 12px;
  border-left-width: 4px;
  border-left-style: solid;
}

.trait-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.trait-name {
  font-weight: 600;
  color: var(--text-primary, #333);
}

.trait-rarity {
  font-size: 0.85em;
  font-weight: 500;
  text-transform: capitalize;
}

.trait-description {
  font-size: 0.9em;
  color: var(--text-secondary, #666);
  margin-top: 4px;
}

.no-traits,
.no-lineage {
  color: var(--text-secondary, #666);
  font-style: italic;
  margin: 0;
}

/* ======================================
   LINEAGE
   ====================================== */

.lineage-info {
  background: var(--bg-secondary, #f5f5f5);
  border-radius: 6px;
  padding: 12px;
}

.lineage-info .parent,
.lineage-info .generation {
  padding: 6px 0;
  color: var(--text-primary, #333);
}

/* ======================================
   ADVANCED ACTIONS
   ====================================== */

.advanced-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.action-btn-large {
  padding: 16px 20px;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1em;
  color: white;
}

.train-btn {
  background: #9b59b6;
}

.train-btn:hover {
  background: #8e44ad;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(155, 89, 182, 0.3);
}

.breed-btn {
  background: #e91e63;
}

.breed-btn:hover {
  background: #c2185b;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(233, 30, 99, 0.3);
}

.customize-btn {
  background: #ff9800;
}

.customize-btn:hover {
  background: #f57c00;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

/* ======================================
   RESPONSIVE
   ====================================== */

@media (max-width: 768px) {
  .pigeon-detail-body {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .pigeon-detail-avatar {
    height: 150px;
  }
  
  .pigeon-icon-large {
    font-size: 6em;
  }
  
  .advanced-actions {
    grid-template-columns: 1fr;
  }
}
