:root {
    --primary-color: #f1ad1c;
    --primary-hover: #f6cf7c;
    --background-color: #231f20;
    --card-background: #444141;
    --text-color: #e6e6e6;
    --border-color: #545152;
    --border-radius: 0.5rem;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.2);
    --accent-color: #d3e5ae;
    --accent-hover: #a9cc60;
}

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

body {
    font-family: 'Barlow', 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.subtitle {
    color: var(--text-color);
}

.card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.select-styled {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5em;
}

.table-container {
    overflow: visible !important;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: max-content;
    overflow: visible !important;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    min-width: 100px;
    max-width: 200px;
    overflow: visible !important;
}

.table th {
    background-color: var(--background-color);
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: var(--card-background);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #000;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 1rem auto;
    }
    
    .card {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
} 

.quantity-input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.btn-icon {
    padding: 0.25rem 0.5rem;
    background: #dd001a;
    color: white;
    border-radius: var(--border-radius);
}

.btn-icon:hover {
    background: #fe4359;
}

.resource-amount {
    text-align: right;
}

optgroup {
    font-weight: 600;
    color: var(--text-color);
    background-color: var(--background-color);
}

option {
    font-weight: normal;
    padding-left: 1rem;
}

.table th:first-child,
.table td:first-child {
    min-width: 200px;
}

.table th:nth-child(2),
.table td:nth-child(2) {
    min-width: 100px;
}

/* Desktop view - keep the narrow width for the × button */
.table th:last-child,
.table td:last-child {
    min-width: 50px;
    width: 50px;
}

.choices {
    margin-bottom: 0;
}

.choices__heading {
    color: white;
    background-color: var(--primary-color);
    font-size: 16px;
}

.choices__inner {
    padding: 4px 8px;
    min-height: 32px;
}

.choices__list--dropdown {
    z-index: 999999;
    background-color: white;
    color: black;
}

.choices__list--dropdown .choices__item {
    color: black;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: var(--accent-color);
    color: black;
}

.choices__inner {
    background-color: white;
    color: black;
}

.choices__input {
    background-color: white;
    color: black;
}

.choices__list--single {
    padding: 0;
    color: black;
}

td .choices {
    min-width: 200px;
    display: block;
}

.game-logo {
    height: 100px;
    width: auto;
}

.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #666;
    font-size: 0.9rem;
}

.footer a {
    color: #0066cc;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.select-with-tooltip {
    display: flex;
    align-items: center;
    gap: 8px;
}

.select-with-tooltip .choices {
    flex: 1;
}

.info-tooltip {
    display: inline-flex;
    align-items: center;
    position: relative;
    cursor: help;
}

.info-tooltip span {
    font-size: 1.2em;
}

.tooltip-content {
    visibility: hidden;
    position: absolute;
    background: #fff;
    color: #333;
    padding: 10px;
    border-radius: 4px;
    width: 200px;
    z-index: 1000;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 1px solid #ddd;
}

.info-tooltip:hover .tooltip-content {
    visibility: visible;
}

/* Arrow pointing left */
.tooltip-content::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px 10px 5px 0;
    border-style: solid;
    border-color: transparent #ddd transparent transparent;
}

/* Responsive table styles */
@media screen and (max-width: 768px) {
    /* Hide table headers on mobile */
    #piecesTable thead {
        display: none;
    }

    /* Make rows behave like cards */
    #piecesTable tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        padding: 1rem;
        background: var(--card-background);
    }

    /* Make cells behave like rows with proper spacing */
    #piecesTable td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
    }

    /* Style for resource amounts */
    #piecesTable td.resource-amount {
        padding: 0.25rem 0;
    }

    /* Add labels for each cell */
    #piecesTable td::before {
        content: attr(data-label);
        font-weight: 500;
        color: var(--text-color);
    }

    /* Special handling for the piece type cell with dropdown */
    #piecesTable td:first-child {
        display: block;
        margin-bottom: 1rem;
    }

    #piecesTable td:first-child::before {
        display: block;
        margin-bottom: 0.5rem;
    }

    /* Special styling for the delete button cell */
    #piecesTable td:last-child {
        justify-content: flex-end;
        border-top: 1px solid var(--border-color);
        margin-top: 0.5rem;
        padding-top: 1rem;
    }

    #piecesTable td:last-child::before {
        display: none;
    }

    /* Adjust select container width */
    .select-with-tooltip {
        width: 100%;
    }

    /* Make quantity input take full width */
    .quantity-input {
        width: 100px;
        text-align: right;
    }

    /* Resource amounts alignment */
    .resource-amount {
        text-align: right;
    }

    .table th:last-child, 
    .table td:last-child {
        min-width: auto;
        width: auto;
    }

    /* Style the remove button */
    .btn-icon.delete-row {
        width: auto;
        min-width: 80px;
        padding: 0.5rem 1rem;
    }
}

@media screen and (max-width: 768px) {
    #summaryTable thead {
        display: none;
    }

    #summaryTable tr {
        display: flex;
        padding: 0.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    #summaryTable td {
        flex: 1;
    }

    #summaryTable td:first-child {
        font-weight: bold;
    }
}

/* Desktop/Mobile visibility classes */
.mobile-only {
    display: none;
}

.desktop-only {
    display: inline;
}

@media screen and (max-width: 768px) {
    .mobile-only {
        display: inline;
    }
    
    .desktop-only {
        display: none;
    }

    /* Update delete button styling for mobile */
    .btn-icon.delete-row {
        width: auto;
        padding: 0.5rem 1rem;
        background: #dd001a;
        color: white;
        border-radius: var(--border-radius);
        font-size: 0.9rem;
    }

    .btn-icon.delete-row:hover {
        background: #fe4359;
    }
}