/**
 * GCG Product Import Display Styles
 *
 * Styles for displaying Gundam Card Game sealed-product card lists.
 * Card grid mirrors the deck block layout; quantity badge is always shown.
 */

/* Container */
.gcg-product-import-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Product Header */
.gcg-product-import-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.gcg-product-import-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #333;
}

.gcg-product-import-code {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    background: #f0f0f0;
    border-radius: 4px;
    padding: 2px 8px;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.gcg-product-import-description {
    margin: 8px 0 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

/* Card count summary */
.gcg-product-import-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    color: #444;
}

.gcg-product-import-summary strong {
    font-weight: 600;
    color: #222;
}

/* Card Grid */
.gcg-product-import-cards {
    display: grid;
    gap: 16px;
    margin-bottom: 4px;
}

/* Individual Card Tile */
.gcg-product-import-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gcg-product-import-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gcg-product-import-card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 0.716;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 8px;
}

.gcg-product-import-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Quantity Badge — always shown */
.gcg-product-import-quantity {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    min-width: 34px;
    text-align: center;
    line-height: 1.2;
}

/* Card name */
.gcg-product-import-card-name {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    color: #333;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    width: 100%;
    margin-bottom: 4px;
}

/* Rarity badge */
.gcg-product-import-rarity {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #888;
    text-transform: uppercase;
}

/* Error / Empty States */
.gcg-product-import-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 16px;
    margin: 20px 0;
    color: #856404;
    font-size: 14px;
}

.gcg-product-import-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}

/* Block Editor Placeholder */
.gcg-product-import-block-placeholder {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: #f9f9f9;
    margin: 20px 0;
}

.gcg-product-import-block-placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.gcg-product-import-block-placeholder h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #333;
}

.gcg-product-import-block-placeholder p {
    margin: 8px 0;
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .gcg-product-import-container {
        padding: 16px;
    }

    .gcg-product-import-title {
        font-size: 20px;
    }

    .gcg-product-import-cards {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
        gap: 12px;
    }

    .gcg-product-import-summary {
        flex-direction: column;
        gap: 6px;
    }

    .gcg-product-import-quantity {
        font-size: 13px;
        padding: 3px 8px;
        min-width: 28px;
    }
}

@media screen and (max-width: 480px) {
    .gcg-product-import-cards {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
    }

    .gcg-product-import-card-name {
        font-size: 11px;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .gcg-product-import-container {
        background: #2a2a2a;
        border-color: #444;
    }

    .gcg-product-import-header {
        border-bottom-color: #444;
    }

    .gcg-product-import-title {
        color: #f0f0f0;
    }

    .gcg-product-import-code {
        background: #3a3a3a;
        color: #ccc;
    }

    .gcg-product-import-description {
        color: #ccc;
    }

    .gcg-product-import-summary {
        background: #333;
        color: #ccc;
    }

    .gcg-product-import-summary strong {
        color: #f0f0f0;
    }

    .gcg-product-import-card {
        background: #333;
        border-color: #444;
    }

    .gcg-product-import-card-name {
        color: #f0f0f0;
    }

    .gcg-product-import-rarity {
        color: #777;
    }

    .gcg-product-import-error {
        background: #4a3c1c;
        border-color: #9a6e00;
        color: #ffc107;
    }

    .gcg-product-import-empty {
        color: #666;
    }

    .gcg-product-import-block-placeholder {
        background: #2a2a2a;
        border-color: #555;
    }

    .gcg-product-import-block-placeholder h3 {
        color: #f0f0f0;
    }

    .gcg-product-import-block-placeholder p {
        color: #aaa;
    }
}

/* Print */
@media print {
    .gcg-product-import-container {
        box-shadow: none;
        border: 1px solid #000;
        page-break-inside: avoid;
    }

    .gcg-product-import-cards {
        gap: 8px;
    }
}
