/**
 * Mockup Studio - Use Case Specific Styles
 * Full-featured mockup rendering with comprehensive controls
 */

/* ===== Studio Layout ===== */
.studio-content {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 24px;
    min-height: 500px;
    width: 100%;
}

/* ===== Preview Area ===== */
.studio-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 16px;
    min-height: 450px;
    box-shadow: var(--shadow);
}

.preview-mockup {
    width: 100%;
    height: 100%;
    background: var(--surface-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.preview-mockup img {
    max-width: 100%;
    max-height: 450px;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.mockup-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    padding: 32px;
}

.mockup-placeholder svg {
    width: 48px;
    height: 48px;
    color: var(--primary-lighter);
    opacity: 0.5;
}

.mockup-placeholder span {
    font-size: 14px;
    color: var(--text-muted);
}

/* ===== Controls Panel ===== */
.studio-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-content: start;
    max-width: 100%;
    width: 100%;
}

.control-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.control-section h3 {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== URL Input ===== */
.url-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-size: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.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: 6px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-secondary);
    border: 1px solid var(--border);
}

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

/* ===== Fit Options ===== */
.fit-options {
    display: flex;
    gap: 6px;
}

.fit-btn {
    flex: 1;
    padding: 6px 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.fit-btn:hover {
    border-color: var(--primary);
    color: var(--text);
    background: var(--primary-bg);
}

.fit-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ===== Control Row ===== */
.control-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.control-row:last-child {
    margin-bottom: 0;
}

.control-row label {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 65px;
    flex-shrink: 0;
}

.control-row input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--surface-secondary);
    border-radius: var(--radius-full);
    outline: none;
}

.control-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease;
    box-shadow: var(--shadow);
}

.control-row input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.range-value {
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    min-width: 40px;
    text-align: right;
}

/* ===== Toggle Row ===== */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.toggle-row:last-child {
    margin-bottom: 0;
}

.toggle-row label:first-child {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Toggle Switch ===== */
.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--surface-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: all 0.2s ease;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.toggle input:checked + .toggle-slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* ===== Select Input ===== */
.select-input {
    width: 100%;
    padding: 8px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 12px;
    color: var(--text);
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
}

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

.select-input.small {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
}

/* ===== Color Picker Row ===== */
.color-picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.color-picker-row input[type="color"] {
    width: 36px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    background: none;
}

.color-picker-row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.color-picker-row input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: var(--radius-sm);
}

.color-value {
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

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

    .studio-preview {
        order: -1;
        min-height: 300px;
    }

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

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

@media (max-width: 480px) {
    .studio-controls {
        grid-template-columns: 1fr;
    }
}
