/* ═══════════════════════════════════════════════════════════════
   Virtual Install v2.8 — ArtCloud-style Wall Visualizer
   ═══════════════════════════════════════════════════════════════ */

.vi-trigger-wrap { display: inline-block; margin: 6px 0; }
.vi-trigger {
    text-decoration: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: opacity 0.2s;
}
.vi-trigger--link {
    font-size: 13px; font-weight: 600; letter-spacing: 0.8px;
    text-transform: uppercase; color: #333; border: none; background: none; padding: 6px 0;
}
.vi-trigger--link:hover { opacity: 0.6; color: #333; }
.vi-trigger--btn {
    font-size: 14px; font-weight: 600; color: #fff;
    background: #333; padding: 10px 24px; border-radius: 4px; border: none;
}
.vi-trigger--btn:hover { opacity: 0.85; color: #fff; }

.vi-overlay {
    position: fixed; inset: 0; z-index: 999999;
    background: rgba(0,0,0,0.82);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.vi-overlay.vi-show { opacity: 1; }

.vi-modal {
    position: relative; width: 96vw; max-width: 1100px; max-height: 94vh;
    background: #fff; border-radius: 8px;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transform: translateY(16px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
}
.vi-overlay.vi-show .vi-modal { transform: translateY(0) scale(1); }

.vi-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 20px; border-bottom: 1px solid #e8e8e8;
    background: #fafafa; flex-shrink: 0;
}
.vi-head-left { display: flex; align-items: center; gap: 10px; }
.vi-head-icon {
    width: 36px; height: 36px; background: #1a1a2e; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
}
.vi-head-title {
    font-size: 14px; font-weight: 700; color: #222;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.vi-head-title span { font-weight: 400; color: #888; margin-left: 8px; font-size: 12px; }
.vi-close {
    width: 32px; height: 32px; border: none; background: none;
    cursor: pointer; color: #666;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: background 0.2s, color 0.2s;
}
.vi-close:hover { background: #eee; color: #222; }

.vi-canvas-area {
    flex: 1; display: flex; align-items: center; justify-content: center;
    background: #2a2a2a; position: relative; overflow: hidden; min-height: 300px;
}
.vi-canvas-area canvas { display: block; max-width: 100%; max-height: 100%; cursor: default; }

.vi-loader {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: #2a2a2a; z-index: 2; gap: 10px;
}
.vi-loader-ring {
    width: 36px; height: 36px;
    border: 3px solid #555; border-top-color: #ccc;
    border-radius: 50%; animation: vi-spin 0.7s linear infinite;
}
@keyframes vi-spin { to { transform: rotate(360deg); } }
.vi-loader-text { font-size: 13px; color: #aaa; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

.vi-foot {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; border-top: 1px solid #e8e8e8;
    background: #fafafa; flex-shrink: 0; flex-wrap: wrap; gap: 8px;
}
.vi-foot-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vi-foot-right { display: flex; align-items: center; gap: 6px; }

.vi-rooms-strip { display: flex; align-items: center; gap: 6px; }
.vi-room-thumb {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    cursor: pointer; border-radius: 5px; transition: transform 0.15s;
}
.vi-room-thumb:hover { transform: translateY(-2px); }
.vi-room-thumb img {
    width: 72px; height: 48px; object-fit: cover; border-radius: 4px;
    border: 2px solid transparent;
    transition: border-color 0.15s, box-shadow 0.15s; display: block;
}
.vi-room-thumb--active img {
    border-color: #1a1a2e;
    box-shadow: 0 0 0 2px rgba(26,26,46,0.25);
}
.vi-room-thumb span {
    font-size: 9px; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; white-space: nowrap;
}
.vi-room-thumb--active span { color: #1a1a2e; }

.vi-room-thumb--upload .vi-room-upload-box {
    width: 72px; height: 48px;
    border: 2px dashed #ccc; border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    background: #fff; transition: border-color 0.15s, background 0.15s;
}
.vi-room-thumb--upload:hover .vi-room-upload-box { border-color: #888; background: #f5f5f5; }
.vi-room-thumb--upload.vi-room-thumb--active .vi-room-upload-box { border-style: solid; border-color: #1a1a2e; }

.vi-foot-divider { width: 1px; height: 36px; background: #e0e0e0; flex-shrink: 0; }

.vi-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 14px; border: 1px solid #d0d0d0; border-radius: 5px;
    background: #fff; cursor: pointer;
    font-size: 12px; font-weight: 500; color: #444;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: border-color 0.15s, background 0.15s; white-space: nowrap;
}
.vi-btn:hover { border-color: #aaa; background: #f5f5f5; }
.vi-btn svg { flex-shrink: 0; }
.vi-btn--primary { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }
.vi-btn--primary:hover { background: #2d2d4e; border-color: #2d2d4e; }

.vi-file-input { display: none !important; }

@media (max-width: 640px) {
    .vi-modal { width: 100vw; max-height: 100vh; border-radius: 0; }
    .vi-head { padding: 10px 14px; }
    .vi-foot { padding: 8px 10px; justify-content: center; }
    .vi-btn .vi-btn-text { display: none; }
    .vi-room-thumb img,
    .vi-room-thumb--upload .vi-room-upload-box { width: 56px; height: 38px; }
    .vi-foot-divider { display: none; }
}
