/**
 * Public styles for Kouzelný Džin widget
 */

/* Genie Bottle Trigger */
.kouzelny-dzin-bottle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 80px;
    height: 120px;
    cursor: pointer;
    z-index: 9998;
    transition: transform 0.3s ease;
}

.kouzelny-dzin-bottle:hover {
    transform: scale(1.1);
}

.kouzelny-dzin-bottle-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.kouzelny-dzin-bottle-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.kouzelny-dzin-bottle:hover .kouzelny-dzin-bottle-tooltip {
    opacity: 1;
}

/* Main Interface */
.kouzelny-dzin-interface {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 900px;
    height: 600px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.kouzelny-dzin-interface.maximized {
    width: 1600px;
    height: 900px;
    bottom: 50%;
    right: 50%;
    transform: translate(50%, 50%);
}

.kouzelny-dzin-interface.minimized {
    height: 50px;
    overflow: hidden;
}

/* Header */
.kouzelny-dzin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: move;
}

.kouzelny-dzin-title {
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.kouzelny-dzin-status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ade80;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.kouzelny-dzin-controls {
    display: flex;
    gap: 8px;
}

.kouzelny-dzin-btn-icon {
    width: 30px;
    height: 30px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.kouzelny-dzin-btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Content Area */
.kouzelny-dzin-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 16px;
    overflow-y: auto;
    background: #f8f9fa;
}

/* Operator Video */
.kouzelny-dzin-operator-container {
    width: 100%;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.kouzelny-dzin-operator-video {
    width: 100%;
    height: auto;
    display: block;
}

/* Screen Sharing Viewer */
.kouzelny-dzin-screen-container {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    background: #1a1a1a;
}

.kouzelny-dzin-interface.maximized .kouzelny-dzin-screen-container {
    height: 600px;
}

.kouzelny-dzin-screen-viewer {
    width: 100%;
    height: 100%;
    position: relative;
}

.kouzelny-dzin-screen-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #888;
    font-size: 14px;
}

.kouzelny-dzin-screen-viewer img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Audio Status */
.kouzelny-dzin-audio-status {
    background: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.kouzelny-dzin-mic-status {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.kouzelny-dzin-mic-status:hover {
    opacity: 0.8;
}

.kouzelny-dzin-mic-icon {
    font-size: 20px;
}

.kouzelny-dzin-mic-text {
    font-size: 14px;
    color: #333;
}

.kouzelny-dzin-mic-status.active .kouzelny-dzin-mic-icon {
    animation: recording 1.5s infinite;
}

@keyframes recording {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Result Display */
.kouzelny-dzin-result {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 20px;
    color: white;
}

.kouzelny-dzin-result-content h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
}

.kouzelny-dzin-result-content p {
    margin: 0 0 15px 0;
    font-size: 14px;
}

.kouzelny-dzin-design-link {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.kouzelny-dzin-design-link:hover {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 1024px) {
    .kouzelny-dzin-interface {
        width: 90vw;
        height: 80vh;
        bottom: 5vh;
        right: 5vw;
    }
    
    .kouzelny-dzin-interface.maximized {
        width: 95vw;
        height: 90vh;
        bottom: 50%;
        right: 50%;
    }
}
