/* 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;
}

/* Broodmare gait filter */
.hbm-gait-filter-host {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 14px;
}

.hbm-gait-filter-host-broodmare {
    align-items: baseline;
}

.hbm-yearling-filter-block {
    margin-top: 20px;
}

.hbm-yearling-filter-text {
    font-family: "Merriweather", serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.8;
    letter-spacing: 1px;
    word-spacing: 1px;
}

.hbm-gait-filter-inline,
.hbm-gait-filter-fallback {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #d3d9df;
    border-radius: 8px;
    padding: 6px 10px 6px 12px;
    box-shadow: 0 1px 2px rgba(22, 20, 20, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hbm-gait-filter-fallback {
    margin: 0 0 14px 0;
}

.hbm-gait-filter-instruction {
    margin: 0 !important;
    width: auto !important;
    flex: 0 1 auto !important;
}

.hbm-gait-filter-inline {
    flex: 0 0 auto;
}

.hbm-gait-filter-label {
    font-family: "Libre Baskerville", "Libre Baskerville Fallback", serif;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 600;
    color: rgb(22, 20, 20);
    white-space: nowrap;
}

.hbm-gait-filter-select {
    min-width: 220px;
    height: 42px;
    padding: 0 40px 0 14px;
    border: 1px solid #c6cdd4;
    border-radius: 6px;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232b3137' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    color: rgb(22, 20, 20);
    font-family: "Libre Baskerville", "Libre Baskerville Fallback", serif;
    font-size: 16px;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.hbm-gait-filter-inline:hover,
.hbm-gait-filter-fallback:hover {
    border-color: #b8c0c8;
}

.hbm-gait-filter-select:hover {
    border-color: #aeb7bf;
}

.hbm-gait-filter-select:focus {
    outline: none;
    border-color: #8b98a6;
    box-shadow: 0 0 0 3px rgba(139, 152, 166, 0.18);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hbm-gait-filter-host {
        flex-wrap: wrap;
    }

    .hbm-gait-filter-inline,
    .hbm-gait-filter-fallback {
        padding: 6px 8px 6px 10px;
    }

    .hbm-gait-filter-select {
        min-width: 180px;
        height: 40px;
        font-size: 15px;
    }

    .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;
    }
}