/* Public Styles - Minimal, nutzt Theme-Styles */

.rgdb-search-box {
    margin-bottom: 30px;
}

.rgdb-search-box input[type="text"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.rgdb-filter-panel {
    background: var(--wp--preset--color--background, #f9f9f9);
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.rgdb-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.rgdb-game-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: visible;
    position: relative;
    transition: transform 0.2s;
}

.rgdb-game-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.rgdb-game-card-collection-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #e6f7ec;
    border: 1px solid #7ac48e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    box-shadow: 0 1px 2px rgba(0,0,0,0.18);
}

.rgdb-game-card-collection-badge img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.rgdb-add-to-collection.rgdb-toolbar-btn.rgdb-toolbar-collection {
    border-color: #0073aa;
    color: #0073aa;
    background: #fff;
}

.rgdb-add-to-collection.rgdb-toolbar-btn.rgdb-toolbar-collection:hover {
    background: #f0f0f0;
    border-color: #0073aa;
    color: #0073aa;
}

.rgdb-in-collection {
    font-size: 11px;
}

.rgdb-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.rgdb-game-card img {
    object-fit: contain !important;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    overflow-clip-margin: 0px !important;
    display: block;
    margin: 0 auto;
}

.rgdb-game-card-content {
    padding: 15px;
}

.rgdb-game-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: flex-end;
    padding: 14px;
    border-radius: 4px;
    pointer-events: none;
}

.rgdb-game-card-overlay-content {
    font-size: 13px;
    line-height: 1.35;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.rgdb-game-card-overlay-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.rgdb-game-card:hover .rgdb-game-card-overlay {
    opacity: 1;
}

.rgdb-game-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.rgdb-game-system {
    color: #666;
    font-size: 14px;
    margin: 0 0 10px 0;
}

.rgdb-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}


.rgdb-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Single Game */
.rgdb-single-game {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.rgdb-single-game-header {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 30px;
}

.rgdb-single-game-cover {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.rgdb-single-game-cover img {
    width: 100%;
    height: 100%;
    max-height: 360px;
    object-fit: contain;
}

.rgdb-single-game-cover-placeholder {
    color: #666;
    font-size: 14px;
    text-align: center;
}

.rgdb-single-game-toolbar {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rgdb-single-game-toolbar .rgdb-toolbar-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rgdb-single-game-toolbar .rgdb-toolbar-button:hover,
.rgdb-single-game-toolbar .rgdb-toolbar-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.rgdb-single-game-toolbar .rgdb-toolbar-button.is-disabled {
    opacity: 1;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

.rgdb-single-game-toolbar .rgdb-toolbar-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.rgdb-single-game-title {
    margin: 0 0 10px 0;
    font-size: 28px;
}

.rgdb-single-game-titlebox {
    border: 1px solid #d7d7d7;
    border-radius: 10px;
    padding: 10px 14px;
    margin: 0 0 12px 0;
    background: #f5f5f5;
}

.rgdb-single-game-titlebox .rgdb-single-game-title {
    margin: 0 0 6px 0;
}

.rgdb-single-game-system,
.rgdb-single-game-release {
    margin: 0 0 6px 0;
    color: #666;
}

.rgdb-single-game-meta {
    margin-top: 15px;
    display: grid;
    gap: 8px;
    color: #333;
}

.rgdb-single-game-meta-row {
    display: grid;
    grid-template-columns: minmax(140px, 200px) 1fr;
    gap: 10px;
}

.rgdb-single-game-meta-label {
    color: #555;
    font-weight: 600;
}

.rgdb-single-game-section {
    margin-top: 24px;
}

.rgdb-single-game-tabs {
    margin-top: 24px;
}

.rgdb-tablist {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid #e2e2e2;
    padding-bottom: 8px;
}

.rgdb-tab-button {
    border: 1px solid #d0d0d0;
    background: #f7f7f7;
    color: #333;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.rgdb-tab-button.is-active {
    background: #fff;
    border-color: #1e73be;
    color: #1e73be;
    font-weight: 600;
}

.rgdb-tab-panel {
    display: none;
    margin-top: 16px;
}

.rgdb-tab-panel.is-active {
    display: block;
}

.rgdb-single-game-section h2 {
    margin: 0 0 12px 0;
    font-size: 20px;
}

.rgdb-single-game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rgdb-single-game-empty {
    color: #666;
    font-style: italic;
    margin: 0;
}

.rgdb-single-game-tag {
    background: #f0f4f9;
    border: 1px solid #d7e3f0;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
}

.rgdb-single-game-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.rgdb-single-game-links a {
    color: #135e96;
    text-decoration: none;
}

.rgdb-single-game-links a:hover {
    text-decoration: underline;
}

/* Frontend Edit */
.rgdb-frontend-edit .form-table {
    width: 100%;
    border-collapse: collapse;
}

.rgdb-frontend-edit .form-table th,
.rgdb-frontend-edit .form-table td {
    display: table-cell;
    padding: 10px 12px;
    vertical-align: top;
}

.rgdb-frontend-edit .form-table th {
    width: 220px;
    color: #555;
    text-align: left;
}

.rgdb-single-game-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.rgdb-single-game-gallery-item {
    display: grid;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.rgdb-single-game-gallery-thumb {
    border: 1px solid #ddd;
    background: #fafafa;
    border-radius: 6px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
}

.rgdb-single-game-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rgdb-image-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rgdb-image-lightbox.is-open {
    display: flex;
}

.rgdb-image-lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    background: #fff;
    border-radius: 6px;
}

.rgdb-image-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 32px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rgdb-image-lightbox-prev {
    left: 20px;
}

.rgdb-image-lightbox-next {
    right: 20px;
}

.rgdb-image-lightbox-nav:disabled {
    opacity: 0.4;
    cursor: default;
}

.rgdb-image-lightbox-close {
    position: absolute;
    top: 14px;
    right: 18px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.rgdb-image-lightbox-open {
    overflow: hidden;
}

.rgdb-single-game-versions-system {
    margin: 18px 0 8px 0;
    font-size: 16px;
    color: #333;
}

.rgdb-single-game-versions-table {
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.rgdb-single-game-versions-row {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr 0.6fr;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    align-items: center;
}

.rgdb-single-game-versions-row:last-child {
    border-bottom: none;
}

.rgdb-single-game-versions-row.is-current {
    background: #c79797;
}

.rgdb-single-game-versions-current-title {
    font-weight: 600;
}

.rgdb-single-game-versions-header {
    background: #f7f7f7;
    font-weight: 600;
}

.rgdb-single-game-versions-row a {
    color: #135e96;
    text-decoration: none;
}

.rgdb-single-game-versions-row a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .rgdb-single-game-versions-row {
        grid-template-columns: 1fr;
    }

    .rgdb-single-game-versions-header {
        display: none;
    }
}

.rgdb-single-game-gallery-label {
    font-size: 12px;
    color: #666;
    text-align: center;
}

@media (max-width: 800px) {
    .rgdb-single-game-header {
        grid-template-columns: 1fr;
    }
}

.rgdb-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 20px;
}

.rgdb-form-grid .full-width {
    grid-column: 1 / -1;
}

.rgdb-single-game-edit-form .rgdb-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.rgdb-single-game-edit-form input[type="number"],
.rgdb-single-game-edit-form select,
.rgdb-single-game-edit-form textarea,
.rgdb-single-game-edit-form input[type="range"] {
    width: 100%;
}

.rgdb-condition-scale {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #555;
}

.rgdb-sale-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.rgdb-sale-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rgdb-sale-switch-slider {
    position: relative;
    width: 46px;
    height: 24px;
    border-radius: 999px;
    background: #c9c9c9;
    transition: background 0.2s ease;
}

.rgdb-sale-switch-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
}

.rgdb-sale-switch input[type="checkbox"]:checked + .rgdb-sale-switch-slider {
    background: #1e73be;
}

.rgdb-sale-switch input[type="checkbox"]:checked + .rgdb-sale-switch-slider::before {
    transform: translateX(22px);
}

.rgdb-sale-switch-label {
    font-weight: 600;
}

.rgdb-inline-form-actions {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.rgdb-inline-collection-status {
    font-size: 14px;
}

.rgdb-inline-collection-status.is-success {
    color: #1d7f2a;
}

.rgdb-inline-collection-status.is-error {
    color: #b42318;
}
