/* AI_TAG: FRONTEND_COMPONENT | Pigeon breeding interface styling */

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

.breeding-modal .modal-content {
  max-height: 90vh;
  overflow-y: auto;
}

.breeding-body {
  padding: 20px;
}

/* ======================================
   BREEDING BLOCKED STATE
   ====================================== */

.breeding-blocked {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-secondary, #f5f5f5);
  border-radius: 12px;
  margin: 20px 0;
}

.breeding-blocked .blocked-icon {
  font-size: 4em;
  margin-bottom: 15px;
  opacity: 0.6;
}

.breeding-blocked h3 {
  font-size: 1.5em;
  margin: 0 0 10px 0;
  color: var(--text-primary, #333);
}

.breeding-blocked p {
  font-size: 1em;
  color: var(--text-secondary, #666);
  margin: 0 0 20px 0;
}

/* ======================================
   BREEDING SELECTION
   ====================================== */

.breeding-selection h3 {
  margin: 0 0 20px 0;
  font-size: 1.3em;
  color: var(--text-primary, #333);
  border-bottom: 2px solid var(--border-color, #ddd);
  padding-bottom: 10px;
}

/* ======================================
   PARENTS GRID
   ====================================== */

.parents-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 30px;
}

.parent-card {
  background: white;
  border: 3px solid var(--border-color, #ddd);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.parent-card.parent-1 {
  border-color: #3498db;
}

.parent-card.parent-2 {
  border-color: #e91e63;
}

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

.parent-label {
  font-weight: 600;
  color: var(--text-secondary, #666);
  font-size: 0.9em;
}

.parent-gender {
  font-size: 1.5em;
}

.parent-icon {
  font-size: 4em;
  margin: 10px 0;
}

.parent-card h4 {
  margin: 10px 0;
  font-size: 1.2em;
  color: var(--text-primary, #333);
}

.parent-info {
  color: var(--text-secondary, #666);
  font-size: 0.9em;
  margin-bottom: 15px;
}

/* ======================================
   PARENT STATS
   ====================================== */

.parent-stats {
  background: var(--bg-secondary, #f5f5f5);
  border-radius: 8px;
  padding: 12px;
}

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

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

.stat-icon {
  font-size: 1.1em;
  width: 24px;
}

.stat-name {
  flex: 1;
  text-align: left;
  padding-left: 8px;
  font-weight: 500;
  color: var(--text-secondary, #666);
}

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

/* ======================================
   PARTNER SELECTOR
   ====================================== */

.partner-selector {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#partner-select {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color, #ddd);
  border-radius: 8px;
  font-size: 1em;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}

#partner-select:focus {
  border-color: #e91e63;
  outline: none;
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.partner-preview {
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.select-prompt {
  color: var(--text-secondary, #666);
  font-style: italic;
  text-align: center;
}

/* ======================================
   GENETIC PREVIEW
   ====================================== */

.genetic-preview {
  background: var(--bg-secondary, #f5f5f5);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  border: 2px solid #9b59b6;
}

.genetic-preview h3 {
  margin: 0 0 15px 0;
  font-size: 1.2em;
  color: #9b59b6;
  border-bottom: none;
}

.preview-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.inheritance-info p {
  color: var(--text-secondary, #666);
  margin: 0 0 15px 0;
  line-height: 1.5;
}

.mutation-chances {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chance-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  border-left: 3px solid #9b59b6;
}

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

.chance-text {
  font-size: 0.9em;
  color: var(--text-primary, #333);
  font-weight: 500;
}

/* ======================================
   STAT PREDICTIONS
   ====================================== */

.predictions-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prediction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: white;
  border-radius: 6px;
  border-left: 3px solid #3498db;
}

.pred-stat {
  font-weight: 600;
  color: var(--text-primary, #333);
  text-transform: capitalize;
  min-width: 100px;
}

.pred-range {
  font-weight: bold;
  color: #2ecc71;
  min-width: 60px;
  text-align: center;
}

.pred-avg {
  font-size: 0.85em;
  color: var(--text-secondary, #666);
}

/* ======================================
   BREEDING COST INFO
   ====================================== */

.breeding-cost-info {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: var(--bg-info, #e8f4f8);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  border: 2px solid #3498db;
}

.cost-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.cost-label {
  font-size: 0.9em;
  color: var(--text-secondary, #666);
  font-weight: 500;
}

.cost-value {
  font-size: 1.2em;
  font-weight: bold;
  color: var(--text-primary, #333);
}

/* ======================================
   START BREEDING BUTTON
   ====================================== */

.breeding-actions {
  display: flex;
  justify-content: center;
}

.btn-start-breeding {
  padding: 16px 48px;
  background: linear-gradient(135deg, #e91e63, #f06292);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.btn-start-breeding:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(233, 30, 99, 0.4);
  background: linear-gradient(135deg, #c2185b, #e91e63);
}

/* ======================================
   ACTIVE BREEDING
   ====================================== */

.active-breeding-body {
  padding: 20px;
}

.breeding-pigeon-info {
  text-align: center;
  margin-bottom: 25px;
}

.pigeon-icon-medium {
  font-size: 4em;
  margin-bottom: 10px;
}

.breeding-pigeon-info h3 {
  margin: 0;
  font-size: 1.3em;
  color: var(--text-primary, #333);
}

.active-breeding-card {
  background: white;
  border: 3px solid #e91e63;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 20px;
}

.breeding-type-display {
  text-align: center;
  margin-bottom: 25px;
}

.breeding-icon-large {
  font-size: 4em;
  display: block;
  margin-bottom: 10px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.breeding-type-display h3 {
  margin: 0 0 10px 0;
  font-size: 1.4em;
  color: var(--text-primary, #333);
}

.breeding-parents {
  color: var(--text-secondary, #666);
  font-size: 0.95em;
  margin: 0;
}

/* ======================================
   BREEDING PROGRESS
   ====================================== */

.breeding-progress-section {
  margin-bottom: 25px;
}

.progress-fill.breeding-fill {
  background: linear-gradient(90deg, #e91e63, #f06292);
}

.breeding-complete {
  text-align: center;
  padding: 30px 20px;
}

.breeding-complete .complete-icon {
  font-size: 4em;
  margin-bottom: 15px;
  animation: bounce 0.6s ease;
}

.breeding-complete h3 {
  font-size: 1.5em;
  margin: 0 0 10px 0;
  color: #e91e63;
}

.breeding-complete p {
  font-size: 1em;
  color: var(--text-secondary, #666);
  margin: 0 0 15px 0;
}

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

.offspring-info strong {
  color: #e91e63;
  font-size: 1.1em;
}

/* ======================================
   EGG PREVIEW GRID (compact, fairy-tale)
   ====================================== */

.egg-preview-section{
  margin-top: 18px;
}
.egg-preview-title{
  font-weight: 900;
  letter-spacing: .3px;
  color: #7b5db9; /* whimsical accent */
  margin-bottom: 10px;
}
.egg-preview-grid{
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content; /* each card only as wide as needed */
  gap: 0px; /* exactly 0px apart for 2px between egg edges */
  justify-content: start;
  /* Make the entire group a single decorative box */
  padding: 4px;
  border-radius: 12px;
  border: 2px solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
    conic-gradient(from 180deg at 50% 50%, #9b59b6, #ffd1dc, #76beff, #9b59b6);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25), inset 0 1px 2px rgba(255,255,255,0.08);
}
.egg-card{
  /* Two pixels wider than egg ellipse visual width (~rx 24 -> 48px nominal) */
  /* SVG scales to 38x50, so set container to 40x52 to be ~2px wider/taller */
  width: 40px;
  height: 52px;
  padding: 0; /* no inner padding; spacing handled by grid gap */
  display: grid;
  place-items: center;
  background: transparent;
  border-radius: 8px; /* small rounding just for safety */
  position: relative;
  border: none;
  box-shadow: none;
}
.egg-card::after{ display:none }
.egg-icon{
  width: 38px;
  height: 50px;
  display: block;
}

/* --------------------------------------
   FAIRY BORDER UTILS + PARENTS PILL
   -------------------------------------- */
/* AI_TAG: FRONTEND_RENDER | Reusable fairy-tale gradient border */
.fairy-border{
  position: relative;
  border: 2px solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
    conic-gradient(from 180deg at 50% 50%, #9b59b6, #ffd1dc, #76beff, #9b59b6);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25), inset 0 1px 2px rgba(255,255,255,0.08);
}

/* Compact pill wrapping the parents "A × B" with tight spacing */
.parents-pill{
  display: inline-flex;
  align-items: center;
  gap: 2px; /* very tight grouping */
  padding: 2px 6px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
}
.parents-pill.fairy-border{ /* ensure rounded border rings align */
  border-radius: 10px;
}
.parents-pill .times{ margin: 0 2px; display: inline-block; }
.parents-pill .p1,.parents-pill .p2{ font-weight: 600; }

/* ======================================
   CANCEL BUTTON
   ====================================== */

.btn-cancel-breeding {
  padding: 12px 24px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel-breeding:hover {
  background: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

/* ======================================
   BREEDING HISTORY
   ====================================== */

.breeding-history {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid var(--border-color, #ddd);
}

.breeding-history h3 {
  margin: 0 0 20px 0;
  font-size: 1.2em;
  color: var(--text-primary, #333);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: var(--bg-secondary, #f5f5f5);
  border-radius: 8px;
  border-left: 4px solid #e91e63;
  transition: all 0.2s;
}

.history-item:hover {
  background: #f8f8f8;
  transform: translateX(5px);
}

.history-icon {
  font-size: 2em;
}

.history-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-parents {
  font-weight: 600;
  color: var(--text-primary, #333);
  font-size: 0.95em;
}

.history-offspring {
  color: #e91e63;
  font-weight: 500;
  font-size: 0.9em;
}

.history-date {
  color: var(--text-secondary, #666);
  font-size: 0.85em;
}

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

@media (max-width: 768px) {
  .parents-grid {
    grid-template-columns: 1fr;
  }
  
  .preview-content {
    grid-template-columns: 1fr;
  }
  
  .breeding-cost-info {
    flex-direction: column;
    gap: 15px;
  }
  
  .btn-start-breeding {
    width: 100%;
    padding: 14px 20px;
  }
}
