/* Horse Breeding Manager Styles - Simple Clean Design */

.horse-breeding-tables {
    font-family: "Libre Baskerville", "Libre Baskerville Fallback", serif;
    margin: 20px 0;
    max-width: none;
    width: 100%;
}

.farm-section {
    margin-bottom: 40px;
}

.farm-title {
    font-size: 1.5em;
    font-weight: 500;
    margin-bottom: 10px;
    color: rgb(22, 20, 20);
    font-family: "Libre Baskerville", "Libre Baskerville Fallback", serif;
}

.horse-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    border-spacing: 2px;
    margin: 0;
    font-size: 16px;
    border-top: 2.5px solid #000;
    box-sizing: border-box;
    font-family: "Libre Baskerville", "Libre Baskerville Fallback", serif;
}

.horse-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: normal;
    color: rgb(22, 20, 20);
    background: #f8f8f8;
    border: 1px solid rgb(226, 231, 236);
    font-family: "Libre Baskerville", "Libre Baskerville Fallback", serif;
    vertical-align: middle;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.horse-table td {
    padding: 12px 16px;
    border: 1px solid rgb(226, 231, 236);
    color: rgb(22, 20, 20);
    vertical-align: middle;
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
    box-sizing: border-box;
    font-family: "Libre Baskerville", "Libre Baskerville Fallback", serif;
    font-weight: normal;
}

.horse-table tbody tr:nth-child(odd) {
    background-color: #fff;
}

.horse-table tbody tr:nth-child(even) {
    background-color: #f8f8f8;
}

.horse-name {
    color: rgb(22, 20, 20);
    font-family: "Libre Baskerville", "Libre Baskerville Fallback", serif;
    font-weight: 500;
    text-align: left;
    vertical-align: middle;
    white-space: pre-wrap;
    border-collapse: collapse;
    border-spacing: 2px;
    box-sizing: border-box;
    word-wrap: break-word;
    text-decoration: underline;
}

.horse-name a {
    color: rgb(22, 20, 20) !important;
    text-decoration: underline;
    font-family: "Libre Baskerville", "Libre Baskerville Fallback", serif;
    font-weight: 500;
}

.horse-name a:hover {
    color: rgb(22, 20, 20) !important;
    text-decoration: underline;
}

.horse-name a:visited {
    color: rgb(22, 20, 20) !important;
}

.horse-name a:active {
    color: rgb(22, 20, 20) !important;
}

.horse-name a:focus {
    color: rgb(22, 20, 20) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .horse-table {
        font-size: 14px;
        min-width: auto;
    }
    
    .horse-table th,
    .horse-table td {
        padding: 8px 10px;
    }
    
    .farm-title {
        font-size: 1.2em;
    }
}

@media (max-width: 600px) {
    .horse-table,
    .horse-table thead,
    .horse-table tbody,
    .horse-table th,
    .horse-table td,
    .horse-table tr {
        display: block;
        border: none;
    }
    
    .horse-table {
        border: 1px solid #ccc;
    }
    
    .horse-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .horse-table tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        padding: 10px;
        background: #fff !important;
    }
    
    .horse-table td {
        border: none;
        position: relative;
        padding-left: 50%;
        padding-right: 10px;
        padding-top: 5px;
        padding-bottom: 5px;
        text-align: right;
    }
    
    .horse-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 10px;
        width: 40%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: normal;
        color: rgb(22, 20, 20);
        text-align: left;
        font-family: "Libre Baskerville", "Libre Baskerville Fallback", serif;
    }
    
    /* Add data labels for mobile */
    .broodmare-table td:nth-of-type(1):before { content: "Name"; }
    .broodmare-table td:nth-of-type(2):before { content: "Sire"; }
    .broodmare-table td:nth-of-type(3):before { content: "Dam"; }
    .broodmare-table td:nth-of-type(4):before { content: "Foaled"; }
    
    .yearling-foal-table td:nth-of-type(1):before { content: "Hip"; }
    .yearling-foal-table td:nth-of-type(2):before { content: "Name"; }
    .yearling-foal-table td:nth-of-type(3):before { content: "Sire"; }
    .yearling-foal-table td:nth-of-type(4):before { content: "Dam"; }
    .yearling-foal-table td:nth-of-type(5):before { content: "Gait/Sex"; }
    .yearling-foal-table td:nth-of-type(6):before { content: "Eligibility"; }
    .yearling-foal-table td:nth-of-type(7):before { content: "DOB"; }
}

/* Print Styles */
@media print {
    .horse-table tbody tr:nth-child(even) {
        background-color: #f8f8f8 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .farm-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .horse-name a {
        color: rgb(22, 20, 20) !important;
        text-decoration: underline !important;
    }
}