/**
 * R.A. Brown Ranch Horse Sale Styles
 * 
 * Colors matched to existing Squarespace theme:
 * - Primary (dark red/maroon): #8b2332
 * - Background (cream): #f5f0eb
 * - Text (dark brown): #3d2314
 * - Accent background (light pink/tan): #e8ddd4
 * - Border: #c9b9a8
 */

/* ========================================
   KEY DETAILS SECTION
   ======================================== */

.horse-key-details-inner {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.horse-availability {
  background-color: #e8ddd4;
  padding: 15px 25px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.horse-availability .available-date {
  display: block;
  font-weight: 600;
  font-size: 1.1em;
  color: #3d2314;
}

.horse-availability .sale-name {
  display: block;
  font-size: 0.95em;
  color: #5a4a3a;
  margin-top: 4px;
}

.horse-lot-box {
  border: 1px solid #c9b9a8;
  padding: 25px;
  background: #fff;
}

.horse-lot-box .lot-number {
  font-size: 1.4em;
  font-weight: 700;
  color: #3d2314;
  margin-bottom: 10px;
}

.horse-lot-box .horse-name-box {
  font-size: 1.1em;
  font-weight: 600;
  color: #3d2314;
  margin-bottom: 15px;
}

.consigner-info {
  font-size: 0.95em;
  color: #5a4a3a;
  line-height: 1.6;
}

.consigner-info .consigner,
.consigner-info .contact {
  display: block;
}

.consigner-info .phone {
  display: block;
  color: #8b2332;
  text-decoration: none;
  margin-top: 5px;
}

.consigner-info .phone:hover {
  text-decoration: underline;
}

.email-consigner-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 28px;
  background-color: #8b2332;
  color: #fff !important;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 500;
  font-size: 0.95em;
  transition: background-color 0.2s ease;
}

.email-consigner-btn:hover {
  background-color: #6d1b27;
  text-decoration: none;
}


/* ========================================
   PEDIGREE SECTION
   ======================================== */

.horse-pedigree-inner {
  max-width: 900px;
  margin: 0 auto;
}

.pedigree-title {
  text-align: center;
  color: #8b2332;
  font-size: 1.8em;
  font-weight: 400;
  margin-bottom: 30px;
  letter-spacing: 0.02em;
}

.pedigree-section {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #c9b9a8;
}

.pedigree-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.pedigree-section-title {
  text-align: center;
  color: #8b2332;
  font-size: 1.2em;
  font-weight: 400;
  margin-bottom: 20px;
}

.pedigree-section-title span {
  border-bottom: 1px solid #8b2332;
  padding-bottom: 2px;
}

.pedigree-tree {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px 30px;
  align-items: center;
}

.gen {
  display: contents;
}

.ancestor {
  text-align: center;
  font-size: 0.9em;
  color: #3d2314;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 8px 5px;
}

/* Parent (Gen 1) - leftmost column */
.gen-1 .ancestor {
  grid-column: 1;
  font-weight: 700;
  font-size: 0.95em;
}

/* Grandparents (Gen 2) - middle column */
.gen-2 .ancestor {
  grid-column: 2;
}

/* Great-grandparents (Gen 3) - rightmost column */
.gen-3 .ancestor {
  grid-column: 3;
  font-size: 0.85em;
  font-weight: 400;
}

/* Position ancestors in rows */
.pedigree-tree .gen-1 .ancestor:nth-child(1) { grid-row: 1 / 5; }

.pedigree-tree .gen-2 .ancestor:nth-child(1) { grid-row: 1 / 3; }
.pedigree-tree .gen-2 .ancestor:nth-child(2) { grid-row: 3 / 5; }

.pedigree-tree .gen-3 .ancestor:nth-child(1) { grid-row: 1; }
.pedigree-tree .gen-3 .ancestor:nth-child(2) { grid-row: 2; }
.pedigree-tree .gen-3 .ancestor:nth-child(3) { grid-row: 3; }
.pedigree-tree .gen-3 .ancestor:nth-child(4) { grid-row: 4; }


/* ========================================
   DESCRIPTION SECTION
   ======================================== */

.horse-description-inner {
  max-width: 600px;
}

.description-title {
  color: #8b2332;
  font-size: 1.2em;
  font-weight: 400;
  margin-bottom: 15px;
  text-align: center;
}

.description-title span {
  border-bottom: 1px solid #8b2332;
  padding-bottom: 2px;
}

.horse-description-inner p {
  color: #3d2314;
  font-size: 0.95em;
  line-height: 1.7;
  margin-bottom: 1em;
}

.horse-description-inner p:last-child {
  margin-bottom: 0;
}


/* ========================================
   KEY INFORMATION SECTION
   ======================================== */

.horse-info-inner {
  max-width: 400px;
  border: 1px solid #c9b9a8;
  padding: 25px;
  background: #fff;
}

.info-title {
  color: #8b2332;
  font-size: 1.2em;
  font-weight: 400;
  margin-bottom: 20px;
  text-align: center;
}

.info-title span {
  border-bottom: 1px solid #8b2332;
  padding-bottom: 2px;
}

.info-list {
  font-size: 0.9em;
}

.info-row {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  display: flex;
  flex-wrap: wrap;
}

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

.info-label {
  font-weight: 600;
  color: #3d2314;
  margin-right: 8px;
}

.info-value {
  color: #5a4a3a;
}


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

@media (max-width: 768px) {
  .pedigree-tree {
    grid-template-columns: 1fr 1.2fr 1.4fr;
    gap: 8px 12px;
  }
  
  .ancestor {
    font-size: 0.8em;
    padding: 6px 3px;
  }
  
  .gen-1 .ancestor {
    font-size: 0.85em;
  }
  
  .gen-3 .ancestor {
    font-size: 0.75em;
  }
  
  .horse-description-inner,
  .horse-info-inner {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .pedigree-tree {
    grid-template-columns: 1fr 1.2fr 1.4fr;
    gap: 6px 8px;
  }
  
  .ancestor {
    font-size: 0.7em;
    padding: 4px 2px;
    word-break: break-word;
  }
  
  .gen-1 .ancestor {
    font-size: 0.75em;
  }
  
  .gen-3 .ancestor {
    font-size: 0.65em;
  }
  
  .info-row {
    flex-direction: column;
  }
  
  .info-label {
    margin-bottom: 2px;
  }
}
