/**
 * Visualizer Tab - Roomvo Integration Styles
 * 
 * Styles for the visualizer tool card and Roomvo widget positioning.
 * Supports future addition of multiple design tools.
 * 
 * @package Silva_Customer_Portal
 * @version 2.2.0
 */

/* ========================================
   VISUALIZER TOOLS ZONE
   ======================================== */

.visualizer-tools-zone {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 20px;
    position: relative;
}

/* ========================================
   TOOL CARD
   ======================================== */

.tool-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0284c7;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 115px;
    width: 520px;
    max-width: 520px;
    margin: 0;
    z-index: 99;
}

/* Second tool card positioning */
.bm-visualizer-card {
    top: 100px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.pulse-indicator {
    position: absolute;
    top: 16px;
    left: -16px;
    background: #f97316;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(249, 115, 22, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
    }
}

.tool-title {
    color: #0c4a6e;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.sw-visualizer-card .tool-title {
    color: #92400e;
}

.bm-visualizer-card .tool-title {
    color: #92400e;
}

.tool-description {
    color: #0369a1;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.sw-visualizer-card .tool-description {
    color: #b45309;
}

.bm-visualizer-card .tool-description {
    color: #b45309;
}

.tool-launch-btn {
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.tool-launch-btn:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tool-launch-btn:active {
    transform: translateY(0);
}

/* ========================================
   ROOMVO WIDGET POSITIONING
   ======================================== */

/* Position Roomvo at top-left */
iframe[src*="roomvo"],
[id*="assistant"]:not(#roomvoAssistant) {
    position: fixed !important;
    top: 80px !important;
    left: 20px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 50;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .tool-card {
        position: relative;
        top: auto;
        left: auto;
        margin: 0px auto 20px;
        max-width: 100%;
    }
    
    .bm-visualizer-card {
        top: auto;
    }
    
    .pulse-indicator {
        left: 50%;
        top: -16px;
        transform: translateX(-50%) rotate(90deg);
    }
    
    iframe[src*="roomvo"],
    [id*="assistant"]:not(#roomvoAssistant) {
        top: 60px !important;
        left: 10px !important;
    }
}

/* ========================================
   VISUALIZER MODAL
   ======================================== */

.visualizer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-visualizer);
    display: flex;
    align-items: center;
    justify-content: center;
}

.visualizer-modal[hidden] {
    display: none;
}

.visualizer-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    cursor: pointer;
}

.visualizer-modal-container {
    position: relative;
    width: 95%;
    height: 95%;
    max-width: 1400px;
    max-height: 900px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.visualizer-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.visualizer-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.visualizer-modal-close {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.visualizer-modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.visualizer-modal-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.visualizer-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Mobile modal adjustments */
@media (max-width: 768px) {
    .visualizer-modal-container {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .visualizer-modal-header {
        padding: 12px 16px;
    }
    
    .visualizer-modal-title {
        font-size: 16px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .pulse-indicator {
        animation: none;
    }
}
