/* WC Design and Art Room Visualizer CSS */

:root {
    --wcd-primary: #ffffff;
    --wcd-accent: #d4af37; /* Gold accent */
    --wcd-bg-dark: rgba(18, 18, 18, 0.85);
    --wcd-border-light: rgba(255, 255, 255, 0.15);
    --wcd-text-light: #f5f5f7;
    --wcd-text-muted: #a1a1a6;
    --wcd-shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --wcd-shadow-metal: 0 15px 35px rgba(0, 0, 0, 0.45), inset 0 0 1px rgba(255, 255, 255, 0.3);
}

/* Container Layout */
.wcd-visualizer-container {
    display: flex;
    flex-wrap: wrap;
    background-color: #0e0e10;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--wcd-text-light);
    height: 700px;
    width: 100%;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Sidebar Styling (Glassmorphism) */
.wcd-sidebar {
    flex: 0 0 350px;
    max-width: 350px;
    background: var(--wcd-bg-dark);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--wcd-border-light);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 10;
    overflow-y: auto;
}

.wcd-sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wcd-sidebar-header h3 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #fff;
}

.wcd-sidebar-header p {
    margin: 0;
    font-size: 13px;
    color: var(--wcd-text-muted);
}

.wcd-sidebar-section {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wcd-section-title {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--wcd-accent);
    margin-bottom: 14px;
    font-weight: 700;
}

/* Room Grid Selection */
.wcd-room-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.wcd-room-btn {
    height: 65px;
    border-radius: 8px;
    border: 2px solid transparent;
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
    padding: 0;
}

.wcd-room-btn span {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 11px;
    padding: 4px;
    text-align: center;
    font-weight: 500;
}

.wcd-room-btn:hover {
    transform: scale(1.02);
}

.wcd-room-btn.active {
    border-color: var(--wcd-accent);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.wcd-custom-wall-upload {
    margin-top: 10px;
}

/* Buttons */
.wcd-btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    width: 100%;
    transition: all 0.2s ease;
    font-weight: 500;
}

.wcd-btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Layout Button Selector */
.wcd-layout-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.wcd-layout-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--wcd-text-light);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.wcd-layout-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.wcd-layout-btn.active {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--wcd-accent);
    color: #fff;
}

/* Layout Icons */
.wcd-layout-icon {
    display: inline-block;
    width: 32px;
    height: 18px;
    background: var(--wcd-text-muted);
    border-radius: 2px;
    opacity: 0.7;
    position: relative;
    transition: all 0.2s;
}

.wcd-layout-btn.active .wcd-layout-icon {
    background: var(--wcd-accent);
    opacity: 1;
}

.wcd-icon-diptych::after {
    content: '';
    position: absolute;
    top: 0; left: 50%; bottom: 0; width: 2px;
    background: #0e0e10;
}

.wcd-icon-triptych::before,
.wcd-icon-triptych::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0; width: 2px;
    background: #0e0e10;
}
.wcd-icon-triptych::before { left: 33%; }
.wcd-icon-triptych::after { left: 66%; }

.wcd-icon-quad::before,
.wcd-icon-quad::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0; width: 2px;
    background: #0e0e10;
}
.wcd-icon-quad::before { left: 25%; }
.wcd-icon-quad::after { left: 50%; }
.wcd-icon-quad::after { left: 75%; }

.wcd-layout-label {
    font-size: 11px;
    font-weight: 500;
}

/* Input Select Dropdowns */
.wcd-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.wcd-select option {
    background: #1c1c1f;
    color: #fff;
}

/* Radio Cards (Finish Selector) */
.wcd-finish-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wcd-radio-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.wcd-radio-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
}

.wcd-radio-card input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--wcd-accent);
}

.wcd-radio-content {
    display: flex;
    flex-direction: column;
}

.wcd-radio-content strong {
    font-size: 13px;
    color: #fff;
}

.wcd-radio-content span {
    font-size: 11px;
    color: var(--wcd-text-muted);
}

/* Sidebar Footer (Checkout Box) */
.wcd-sidebar-footer {
    padding: 24px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.wcd-price-display {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
}

.wcd-price-label {
    font-size: 13px;
    color: var(--wcd-text-muted);
}

.wcd-price-value {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}

.wcd-btn-primary {
    background: linear-gradient(135deg, #d4af37, #aa820a);
    color: #000;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
    display: block;
}

.wcd-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, #e5c158, #c1971c);
}

.wcd-btn-primary:active {
    transform: translateY(1px);
}

/* Workspace (Right side canvas area) */
.wcd-workspace {
    flex: 1;
    background-color: #08080a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    height: 100%;
    min-width: 450px;
}

.wcd-canvas-area {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.wcd-room-bg {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
}

/* Interactive Art Container (Draggable) */
.wcd-art-container {
    position: absolute;
    box-shadow: var(--wcd-shadow-heavy);
    cursor: move;
    z-index: 5;
    transition: transform 0.05s ease;
}

.wcd-art-panels {
    display: flex;
    gap: 4px; /* Gap between panels */
    width: 100%;
    height: 100%;
}

.wcd-art-panel {
    flex: 1;
    height: 100%;
    background-repeat: no-repeat;
    background-size: cover; /* Backed by dynamic sizing in JS */
    position: relative;
    box-shadow: var(--wcd-shadow-metal);
    border-radius: 2px;
}

/* Light metal shine/gloss overlay */
.wcd-panel-reflection {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.05) 30%, rgba(0,0,0,0) 50%, rgba(255,255,255,0.05) 70%, rgba(255,255,255,0.15) 100%);
    pointer-events: none;
}

/* Calibration Overlay */
.wcd-ruler-overlay {
    position: absolute;
    bottom: -25px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.wcd-art-container:hover .wcd-ruler-overlay {
    opacity: 1;
}

.wcd-ruler-line {
    width: 100%;
    height: 2px;
    background: var(--wcd-accent);
    position: relative;
}

.wcd-ruler-line::before,
.wcd-ruler-line::after {
    content: '';
    position: absolute;
    top: -4px;
    width: 2px;
    height: 10px;
    background: var(--wcd-accent);
}
.wcd-ruler-line::before { left: 0; }
.wcd-ruler-line::after { right: 0; }

.wcd-ruler-label {
    font-size: 11px;
    background: #000;
    color: var(--wcd-accent);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    border: 1px solid rgba(212,175,55,0.4);
    font-weight: 600;
}

/* Helpers overlay */
.wcd-canvas-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 8;
}

.wcd-tool-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(18, 18, 18, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.wcd-tool-btn:hover {
    background: #fff;
    color: #000;
}

.wcd-scale-tip {
    position: absolute;
    bottom: 20px;
    left: 20px;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 12px;
    border-radius: 6px;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Custom Upload Styling */
.wcd-upload-container {
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wcd-upload-card {
    background: #121214;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--wcd-shadow-heavy);
}

.wcd-upload-header {
    text-align: center;
    margin-bottom: 30px;
}

.wcd-upload-header h2 {
    font-size: 28px;
    color: #fff;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.wcd-upload-header p {
    color: var(--wcd-text-muted);
    font-size: 15px;
    margin: 0;
}

.wcd-dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.wcd-dropzone.dragover {
    border-color: var(--wcd-accent);
    background: rgba(212, 175, 55, 0.05);
}

.wcd-upload-icon {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--wcd-accent);
    margin-bottom: 20px;
}

.wcd-dropzone h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #fff;
}

.wcd-dropzone p {
    margin: 0 0 15px 0;
    color: var(--wcd-text-muted);
    font-size: 14px;
}

.wcd-btn-inline {
    background: none;
    border: none;
    color: var(--wcd-accent);
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.wcd-upload-limits {
    display: block;
    font-size: 12px;
    color: #666;
}

/* Spinner and Uploading Progress */
.wcd-upload-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #121214;
    border-radius: 12px;
    z-index: 15;
}

.wcd-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--wcd-accent);
    animation: wcd-spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes wcd-spin {
    to { transform: rotate(360deg); }
}

.wcd-progress-bar-container {
    width: 60%;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    margin-top: 15px;
    overflow: hidden;
}

.wcd-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--wcd-accent);
    transition: width 0.2s;
}

/* Analysis Layout */
.wcd-upload-analysis {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.wcd-analysis-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 24px;
}

.wcd-thumbnail-preview {
    flex: 0 0 200px;
    height: 200px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.wcd-thumbnail-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.wcd-meta-details {
    flex: 1;
    min-width: 250px;
}

.wcd-meta-details h3 {
    margin: 0 0 16px 0;
    font-size: 20px;
    color: #fff;
}

.wcd-meta-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.wcd-meta-table td {
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wcd-meta-table td:first-child {
    color: var(--wcd-text-muted);
    width: 120px;
}

.wcd-meta-val {
    font-weight: 600;
    color: #fff;
}

.wcd-quality-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.wcd-quality-badge.excellent { background: rgba(70, 180, 80, 0.2); color: #46b450; }
.wcd-quality-badge.good { background: rgba(0, 115, 170, 0.2); color: #0073aa; }
.wcd-quality-badge.warning { background: rgba(212, 175, 55, 0.2); color: var(--wcd-accent); }

.wcd-quality-notice {
    font-size: 13px;
    color: var(--wcd-text-muted);
    line-height: 1.5;
}

.wcd-analysis-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.wcd-analysis-actions form {
    margin: 0;
    flex: 1;
}

.wcd-analysis-actions button {
    height: 50px;
}

/* Responsiveness */
@media (max-width: 768px) {
    .wcd-visualizer-container {
        flex-direction: column;
        height: auto;
    }
    
    .wcd-sidebar {
        flex: 1 1 auto;
        max-width: 100%;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--wcd-border-light);
    }
    
    .wcd-workspace {
        height: 450px;
    }
    
    .wcd-analysis-actions {
        flex-direction: column-reverse;
    }
}
