/* ===== GAME COMPONENTS CSS - REFACTORED ===== */
/* Diese Datei enthält nur noch spezifische Game-Komponenten-Styles */

/* ===== MESSE TABLE STYLES ===== */
.sortable-table {
    border-collapse: collapse;
    width: 100%;
}

/* Notes Display - Mobile Layout für alle Bildschirmgrößen */
.mobile-notes {
    display: block;
}

.desktop-notes {
    display: none;
}

/* ===== MESSE NOTES IN MODAL ===== */
.messe-notes-element {
    background: #f9f9f9;
    border-left-color: var(--milka-blue);
    padding: 0.3rem;
    align-items: flex-start;
    width: 100%;
    grid-column: 1 / -1;
}

.messe-notes-element strong {
    align-items: flex-start;
    margin-bottom: 0.2rem;
}

.messe-notes-content {
    padding: 0.2rem;
    /* background: #f0f0f0; */
    border-radius: 3px;
    font-size: 0.8rem;
    line-height: 1.2;
    /* margin-top: 0.2rem; */

        margin-top: -10px;

      
}

/* ===== USER NOTES EDITING ===== */
.user-notes-container {
    display: inline-block;
    position: relative;
    /* margin-top: 12px; */
}

.user-notes-display {
    background-color: var(--blue-gray);
    color: var(--baby-blue);
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.85rem;
    margin-right: 5px;
}

.user-notes-edit {
    display: none;
    margin-top: 5px;
}

.user-notes-edit:not(.hidden) {
    display: block;
}

.user-notes-textarea {
    width: 200px;
    min-height: 40px;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.85rem;
    resize: vertical;
    font-family: inherit;
}

.user-notes-buttons {
    margin-top: 5px;
    display: flex;
    gap: 5px;
}

.save-notes-btn, .cancel-notes-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 3px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.save-notes-btn {
    background-color: var(--milka-blue);
    color: white;
}

.save-notes-btn:hover {
    background-color: #0056b3;
}

.save-notes-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.cancel-notes-btn {
    background-color: #6c757d;
    color: white;
}

.cancel-notes-btn:hover {
    background-color: #545b62;
}

.add-notes-btn, .edit-notes-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background-color 0.2s;
    margin-left: 5px;
}

.add-notes-btn:hover, .edit-notes-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.add-notes-btn {
    color: var(--milka-blue);
}

.edit-notes-btn {
    color: #6c757d;
}

/* ===== DETAIL ROW STYLES FOR GAMEMODAL ===== */
.detail-row {
    display: block;
    gap: 0;
    margin-bottom: 0.5rem;
    padding: 0.3rem;
    /* background: #f9f9f9; */
    border-radius: 3px;
    /* border-left: 3px solid var(--milka-blue); */
}

.detail-row strong {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    /* min-width: 120px; */
    font-size: 0.9rem;
    color: #495057;
}

.detail-row strong i {
    color: var(--milka-blue);
    width: 16px;
    text-align: center;
}

/* .messe-notes-row {
    background: #f9f9f9;
    border-left-color: var(--milka-blue);
} */

.messe-notes-row .messe-notes-content {
    flex: 1;
    padding: 0.2rem;
    /* background: #f0f0f0; */
    border-radius: 3px;
    font-size: 0.8rem;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.sortable-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sortable-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: top;
}

.sortable-table tbody tr:last-child td {
    border-bottom: none;
}

.sortable-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sortable-table th.sorted {
    color: var(--milka-blue);
}

.sortable-table .sort-indicator {
    margin-left: 8px;
    font-size: 0.8rem;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.sortable-table th.sorted .sort-indicator {
    opacity: 1;
}

/* ===== WISHLIST-MESSE INTEGRATION STYLING ===== */
.wishlist-row {
    background-color: rgba(255, 193, 7, 0.08);
    border-left: 3px solid #ffc107;
}

.wishlist-row:hover {
    background-color: rgba(255, 193, 7, 0.15);
}

.manual-row {
    background-color: rgba(76, 175, 80, 0.08);
    border-left: 3px solid #4caf50;
}

.manual-row:hover {
    background-color: rgba(76, 175, 80, 0.15);
}

.trade-match-row {
    background-color: rgba(255, 107, 107, 0.08);
    border-left: 3px solid #ff6b6b;
}

.trade-match-row:hover {
    background-color: rgba(255, 107, 107, 0.15);
}

.source-cell {
    font-weight: bold;
    text-align: center;
    font-size: 0.9rem;
    padding: 0.5rem;
}

.messe-source {
    color: #1976d2;
}

.wishlist-source {
    color: #ff9800;
}

.manual-source {
    color: #4caf50;
}

.trade-match-source {
    color: #ff6b6b;  /* Rot für Trade */
}

.source-cell .messe-source::before {
    content: "🎪 ";
}

.source-cell .wishlist-source::before {
    content: "⭐ ";
}

.source-cell .manual-source::before {
    content: "✏️ ";
}

.source-cell .trade-match-source::before {
    content: "🔄 ";
}

th[data-sort="source"] {
    min-width: 80px;
    text-align: center;
}

/* ===== HALL FILTER STYLES ===== */
.hall-filter-container {
    /* margin: 15px 0; */
    padding: 10px 0;
}

.hall-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hall-filter-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.hall-filter-btn:hover {
    border-color: var(--milka-blue);
    background: #f8f9ff;
    color: var(--milka-blue);
}

.hall-filter-btn.active {
    background: var(--milka-blue);
    color: white;
    border-color: var(--milka-blue);
}

.hall-filter-btn.active:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.hall-filter-info {
    color: var(--milka-blue);
    font-weight: 500;
    margin-left: 10px;
    font-size: 14px;
}

/* ===== THUMBNAIL STYLES ===== */
.sortable-table .thumbnail-col {
    width: 72px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.sortable-table .thumbnail-col i {
    color: var(--milka-blue);
    margin-right: 4px;
    font-size: 0.9rem;
}

.sortable-table td.thumbnail-cell {
    width: 72px;
    vertical-align: top;
}

.messe-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-md);
    background: #f2f2f2;
}

/* ===== LOADING AND ERROR STATES ===== */
.loading-container {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-container {
    text-align: center;
    padding: 40px 20px;
}

.error-icon {
    margin-bottom: 20px;
}

.error-container h3 {
    color: var(--error-red);
    margin-bottom: 15px;
}

.error-container p {
    color: #6c757d;
    margin-bottom: 25px;
    line-height: 1.5;
}

.error-actions {
    margin-bottom: 20px;
}

.retry-button:hover {
    background: #0056b3 !important;
}

.close-button:hover {
    background: #545b62 !important;
}

.cancel-button:hover {
    background: #c82333 !important;
}

.retry-info {
    font-size: 0.9em;
    color: #6c757d;
    font-style: italic;
}

/* ===== MOBILE LAYOUT FÜR ALLE BILDSCHIRMGRÖSSEN ===== */
/* Mobile Layout ist jetzt Standard für alle Bildschirmgrößen */

.sortable-table th,
.sortable-table td {
    padding: 6px 8px;
    font-size: 0.8rem;
}

.sortable-table th {
    font-size: 0.75rem;
    padding: 8px 8px;
}

.source-cell {
    font-size: 0.75rem;
    padding: 0.2rem;
}

th[data-sort="source"] {
    min-width: 50px;
}

.hall-filter-buttons {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1px;
}

.hall-filter-btn {
    padding: 4px 8px;
    font-size: 11px;
    min-width: 32px;
    text-align: center;
}

.error-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.retry-button,
.close-button,
.cancel-button {
    width: 100%;
}

/* Thumbnail Handling - Mobile Layout */
.sortable-table th.thumbnail-col {
    display: table-cell;
    width: 60px;
    padding: 4px 8px;
}

.sortable-table td.thumbnail-cell {
    display: table-cell;
    width: 60px;
    padding: 4px 8px;
    vertical-align: middle;
}

/* Hide source column - Mobile Layout */
.sortable-table th[data-sort="source"],
.sortable-table th:nth-child(2),
.sortable-table td.source-cell,
.sortable-table td:nth-child(2) {
    display: none !important;
}

/* Column widths - Mobile Layout */
.sortable-table th[data-sort="name"],
.sortable-table td:nth-child(3) {
    width: 35%;
}

/* Hide price column - Mobile Layout */
.sortable-table th[data-sort="price"],
.sortable-table td:nth-child(5) {
    display: none !important;
}

/* Hide desktop stand, show mobile stand-price combination */
.sortable-table td:nth-child(6) .desktop-stand {
    display: none !important;
}

.sortable-table td:nth-child(6) .mobile-stand-price {
    display: block;
}

.sortable-table th[data-sort="stand"],
.sortable-table td:nth-child(6) {
    width: 20%;
}

.sortable-table th[data-sort="notes"],
.sortable-table td:nth-child(7) {
    width: 20%;
}

.sortable-table th[data-sort="user_notes"],
.sortable-table td:nth-child(8) {
    width: 10%;
}

.messe-thumb.thumb-desktop { 
    display: none; 
}

.messe-thumb.thumb-mobile {
    display: block;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: #f2f2f2;
    cursor: pointer;
    transition: transform var(--transition-fast);
    margin: 0 auto;
}

.messe-thumb.thumb-mobile:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Horizontal layout for name and publisher - Mobile Layout */
.sortable-table td:nth-child(3) {
    min-height: 54px;
    overflow: hidden;
    position: relative;
    padding: 4px 8px;
    vertical-align: top;
}

.sortable-table td:nth-child(3) .mobile-name-publisher {
    display: block;
}

.sortable-table td:nth-child(3) .mobile-name-publisher a {
    font-weight: 500;
    color: #333;
    text-decoration: none;
    line-height: 1.2;
}

.sortable-table td:nth-child(3) .mobile-name-publisher small {
    color: #666;
    font-size: 0.75em;
    line-height: 1.1;
}

/* Hide desktop name completely - Mobile Layout */
.sortable-table td:nth-child(3) .desktop-name {
    display: none !important;
}

/* Hide publisher column - Mobile Layout */
.sortable-table th[data-sort="publisher"],
.sortable-table td:nth-child(4) {
    display: none !important;
}

/* Hide priority column - Mobile Layout */
.sortable-table th[data-sort="priority"],
.sortable-table td:nth-child(7) {
    display: none !important;
}



.priority-filter-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.priority-filter-btn {
    background: no-repeat;
    border: 0.4px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 2px 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 11px;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.priority-filter-btn:hover {
    border-color: #1976d2;
    background: #f5f5f5;
    transform: translateY(-1px);
}

.priority-filter-btn.active {
    background: var(--turquoise_light);
    border-color: var(--turquoise_light);
    color: white;
}

.priority-filter-btn.active:hover {
    background: var(--turquoise_light);
    border-color: var(--turquoise_light);
}

.priority-filter-btn i {
    font-size: 18px;
}

.priority-filter-info {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    margin-left: 10px;
}

/* Priority column styling */
.priority-cell {
    text-align: center;
    width: 50px;
}

.priority-cell i {
    font-size: 18px;
}

/* ===== WISHLIST BUTTON STYLES ===== */
.wishlist-button-container {
    margin: 15px 0;
    text-align: center;
}

.wishlist-button {
    background: white;
    color: white;
    border: none;
    padding: 12px 24px;
    /*! border-radius: 25px; */
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    /*! box-shadow: 0 2px 8px rgba(233, 30, 99, 0.3); */
    /*! display: inline-flex; */
    align-items: center;
    /*! gap: 8px; */
}

.wishlist-button:hover {
    /* background: linear-gradient(135deg, #c2185b, #e91e63);
    transform: translateY(-2px); */
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.4);
}

.wishlist-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(233, 30, 99, 0.3);
}

.wishlist-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wishlist-button i {
    font-size: 16px;
}

/* SVG Icon Styling für Wishlist Button */
.wishlist-button img {
    width: 32px;
    height: 32px;
}

/* ===== MESSE BUTTON STYLES ===== */
.messe-button-container {
    margin: 15px 0;
    text-align: center;
}

.messe-button {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.messe-button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.messe-button:active {
    transform: translateY(0);
}

.messe-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.messe-button img {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
}


/* ===== DELETE BUTTONS (GEMEINSAME STYLES) ===== */
.delete-btn {
    background: transparent;
    border: none;
    /* padding: 4px; */
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    outline: none;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

.delete-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    transform: scale(1.1);
}

.delete-btn:active {
    transform: scale(0.95);
}

.delete-btn:focus-visible {
    outline: 2px solid var(--error-red);
    outline-offset: 2px;
}

.delete-btn i {
    color: #dc3545;
    font-size: 16px;
}

/* ===== EDIT BUTTONS (GEMEINSAME STYLES) ===== */
.edit-btn {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    outline: none;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

.edit-btn:hover {
    background: rgba(0, 123, 255, 0.1);
    transform: scale(1.1);
}

.edit-btn:active {
    transform: scale(0.95);
}

.edit-btn:focus-visible {
    outline: 2px solid var(--milka-blue);
    outline-offset: 2px;
}

.edit-btn i {
    color: #007bff;
    font-size: 16px;
}

/* ===== LEGACY SUPPORT ===== */
/* Behalte alte Klassen für Rückwärtskompatibilität - erben automatisch von .delete-btn */

/* ===== MESSE ACTIONS LAYOUT ===== */
.messe-actions {
    display: flex;
    /* gap: 10px; */
    justify-content: flex-start;
    margin-top: 10px;
}

.messe-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.messe-actions .btn i {
    font-size: 14px;
}



/* Icons nebeneinander darstellen */
.game-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.wishlist-button-container {
    margin: 0;
    display: flex;
    align-items: center;
}

.wishlist-button {
    background: white;
    color: white;
    border: none;
    padding: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Success/Error Messages */
.wishlist-success-message,
.wishlist-error-message {
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Wishlist Button - Standard für alle Bildschirmgrößen */
.wishlist-button {
    font-size: 13px;
}

/* ===== LAYOUT COMPONENTS ===== */
.bgg-description-toggle {
    margin-top: 0px;
}

.bgg-description-content {
    margin-top: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}

.bgg-description-content.hidden {
    display: none !important;
}

.game-description-no-margin {
    margin-bottom: 0;
}

