/**
 * Lookbook Generator - Use Case Specific Styles
 * Batch rendering layout with mockup grid preview
 */

/* ===== Lookbook Layout ===== */
.lookbook-content {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
}

.lookbook-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.lookbook-right {
    display: flex;
    flex-direction: column;
}

/* ===== Section Hint ===== */
.section-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 8px 0;
}

/* ===== URL Input ===== */
.url-input-group {
    display: flex;
    gap: 8px;
}

.url-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.url-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.url-input::placeholder {
    color: var(--text-muted);
}

/* ===== Artwork Preview ===== */
.artwork-preview {
    margin-top: 12px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.artwork-preview img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    padding: 12px;
}

/* ===== Color Section ===== */
.color-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.swatch {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: var(--shadow-sm);
}

.swatch:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.swatch.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

.swatch[style*="#ffffff"],
.swatch[style*="rgb(255, 255, 255)"] {
    border-color: var(--border);
}

/* ===== Mockup Grid ===== */
.mockup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.mockup-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mockup-preview {
    aspect-ratio: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.mockup-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mockup-item:hover .mockup-preview {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.mockup-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
}

/* ===== Loading & Error States ===== */
.loading-state,
.error-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px;
    color: var(--text-muted);
    font-size: 14px;
}

.loading-state svg,
.error-state svg {
    width: 32px;
    height: 32px;
}

.error-state svg {
    color: var(--error);
}

/* ===== Mockup Loading Overlay ===== */
.mockup-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--radius-lg);
}

.mockup-loading svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

/* Spin animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .lookbook-content {
        grid-template-columns: 1fr;
    }

    .lookbook-right {
        order: -1;
    }

    .mockup-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .mockup-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
