/* Root Styles */
:root {
    --primary-color: #007E3B;
    --border-color: #ddd;
    --fastball-color: #D7263D;
    --changeup-color: #FF7A00;
    --dropball-color: #F2C94C;
    --riseball-color: #007E3B;
    --curveball-color: #0077C8;
    --screwball-color: #6A0DAD;
}

/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

button {
    cursor: pointer;
    padding: 8px 16px;
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 99px;
    font-size: 14px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: color-mix(in srgb, var(--primary-color) 20%, white 80%);
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    font-size: 16px;
    padding: 10px 20px;
}

.primary-btn:hover {
    background-color: color-mix(in srgb, var(--primary-color) 70%, white 30%);
}

input[type="text"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}

.no-wrap {
    white-space: nowrap;
}

/* Settings Panel */
.settings-panel {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.pitch-selection, .seed-control {
    margin-bottom: 20px;
}

.pitch-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.pitch-type-section {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid var(--border-color);
}

.pitch-type-section h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.pitch-type-checkbox {
    display: flex;
    align-items: center;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 5px;
    background-color: color-mix(in srgb, var(--primary-color) 10%, white 90%);
    border-radius: 4px;
}

.pitch-type-checkbox input {
    margin-right: 8px;
}

.location-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding-left: 15px;
}

.location-checkbox {
    display: flex;
    align-items: center;
    background-color: #eee;
    padding: 6px 10px;
    border-radius: 4px;
    min-width: 15ch;
}

.location-checkbox input {
    margin-right: 8px;
}

.pitch-checkbox {
    display: flex;
    align-items: center;
    background-color: #eee;
    padding: 8px 12px;
    border-radius: 4px;
}

.pitch-checkbox input {
    margin-right: 8px;
}

.seed-input-group {
    display: flex;
    gap: 10px;
}

.seed-input-group input {
    flex: 1;
}

#generate-card-btn {
    display: block;
    margin: 20px auto 0;
}

#add-pitch-btn {
    display: none;
}

/* Results Panel */
.results-panel {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    background-color: transparent;
    color: #333;
    border: none;
    padding: 10px 20px;
    margin-right: 5px;
    border-radius: 16px 16px 0 0;
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.tab-pane {
    display: none;
    background-color: white;
    border-radius: 4px;
    min-height: 400px;
}

.tab-pane.active {
    display: block;
}

/* Wristband Styles */
.grid-container {
    overflow-x: auto;
}

.pitch-grid {
    border-collapse: collapse;
    width: 100%;
}

.pitch-grid tr {
    height: 40px;
}

.pitch-grid tr:nth-child(odd) {
    background-color: #f6f6f6;
}

.pitch-grid th, .pitch-grid td {
    border: 1px solid #333;
    padding: 7px 12px;
}

.pitch-grid td {
    padding: 2px;
    font-size: 12px;
}

.pitch-grid th {
    background-color: #2c3e50;
    color: white;
    text-align: center;
}

.pitch-grid td strong {
    padding: 0 2px 0 8px;
}

/* Translations Styles */
.translations-container h3 {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
    margin: 20px 0 10px;
    border-radius: 4px;
    font-size: 1.2em;
}

.translations-container h3:first-child {
    margin-top: 0;
}

.translations-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.translations-table th, .translations-table td {
    border: 1px solid var(--border-color);
    padding: 0 16px;
    text-align: left;
}

.translations-table th {
    background-color: #2c3e50;
    color: white;
    padding: 8px 12px;
}

.translations-table td:nth-child(1) {
    font-weight: bold;
}

.translations-table td:nth-child(2) {
    width: 100%;
}

.translations-table tr:nth-child(odd) {
    background-color: #f5f5f5;
}

.translations-table td span {
    display: inline-block;
    padding: 6px 12px;
}

.pitch-type-header td {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    font-size: 1.1em;
    text-align: center;
}

.possible-call td {
    background-color: #f5f5f5;
}

.selected-call td {
    background-color: #e6f7e6;
    font-weight: bold;
}

.translations-table tr.possible-call:not(.selected-call) td {
    color: #777;
}

/* Print Controls */
.print-controls {
    margin-top: 20px;
    text-align: center;
}

/* Print Styles */
@media print {
    body {
        background-color: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        max-width: 100%;
    }

    h1 {
        display: none;
    }

    .settings-panel, .tabs, .print-controls {
        display: none;
    }

    .tab-pane {
        display: block;
        border: none;
        padding: 0;
        width: auto;
        margin: 0 auto;
    }

    .tab-pane:not(.print-target):not(.active) {
        display: none;
    }

    .grid-container {
        width: fit-content;
        margin: 0 auto;
    }

    .translations-container {
        width: fit-content;
        margin: 0 auto;
    }

    .results-panel {
        border: none;
        padding: 0;
        background-color: transparent;
    }
}
