/**
 * GoodVibesOnly Bot Preview - Split View Styles
 * Provides Page Builder-style split view for bot-generated page previews
 */

.gvo-bot-split-view-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f4f4f5;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gvo-bot-split-view {
    display: flex;
    height: 100vh;
    gap: 0;
}

.gvo-bot-split-chat {
    width: 30%;
    min-width: 350px;
    max-width: 500px;
    background: white;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e4e4e7;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

.gvo-bot-split-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
}

.gvo-bot-split-header,
.gvo-bot-split-preview-header {
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #e4e4e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    font-size: 14px;
    color: #09090b;
    min-height: 56px;
}

.gvo-bot-split-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    background: #fafafa;
}

.gvo-bot-split-messages::-webkit-scrollbar {
    width: 8px;
}

.gvo-bot-split-messages::-webkit-scrollbar-track {
    background: #f4f4f5;
}

.gvo-bot-split-messages::-webkit-scrollbar-thumb {
    background: #d4d4d8;
    border-radius: 4px;
}

.gvo-bot-split-messages::-webkit-scrollbar-thumb:hover {
    background: #a1a1aa;
}

.gvo-bot-close-split {
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    color: #71717a;
}

.gvo-bot-close-split:hover {
    background: #e4e4e7;
    color: #09090b;
}

.gvo-bot-preview-expand:focus,
.gvo-bot-close-split:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Responsive design */
@media (max-width: 1024px) {
    .gvo-bot-split-chat {
        width: 40%;
        min-width: 300px;
    }
}

@media (max-width: 768px) {
    .gvo-bot-split-view {
        flex-direction: column;
    }
    
    .gvo-bot-split-chat {
        width: 100%;
        max-width: none;
        height: 40%;
        border-right: none;
        border-bottom: 1px solid #e4e4e7;
    }
    
    .gvo-bot-split-preview {
        height: 60%;
    }
}

/* Animation for iframe loading */
.gvo-bot-split-preview iframe {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Reference Image Upload Styles */
.gvo-chat-attachment-btn:hover:not(:disabled) {
    opacity: 1 !important;
    background: #f4f4f5 !important;
    border-radius: 4px;
}

.gvo-chat-attachment-btn:disabled {
    cursor: not-allowed;
    opacity: 0.3 !important;
}

#gvo-bot-reference-upload-section {
    animation: slideDown 0.2s ease-out;
}

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

/* Reference Image Model Selection Dropdowns */
#gvo-reference-gen-model,
#gvo-reference-edit-model {
    background: white;
    color: #18181b;
    cursor: pointer;
    transition: border-color 0.2s;
}

#gvo-reference-gen-model:hover,
#gvo-reference-edit-model:hover {
    border-color: #a1a1aa;
}

#gvo-reference-gen-model:focus,
#gvo-reference-edit-model:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 1px;
    border-color: #3b82f6;
}
