/* preview3d.css - Styly pro 3D Preview Modal */

/* 3D Preview Modal */
.preview-3d {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-3d.active {
    display: block;
    opacity: 1;
}

.preview-3d-content {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Canvas pro Three.js */
#preview3DCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Název stylu */
.preview-title {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 30px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tlačítko pro zavření */
.close-preview {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #ff0000;
    border: none;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.close-preview:hover {
    background: #ff3333;
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.5);
}

/* Ovládací prvky */
.preview-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #333;
    backdrop-filter: blur(10px);
}

.control-btn {
    width: 50px;
    height: 50px;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: #333;
    border-color: #00ffff;
    color: #00ffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

.control-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 255, 255, 0.3);
}

/* Loading indikátor pro 3D preview */
.preview-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 18px;
    text-align: center;
}

.preview-loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #00ffff;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    .preview-title {
        font-size: 20px;
        padding: 8px 20px;
    }
    
    .preview-controls {
        bottom: 20px;
        padding: 10px;
        gap: 8px;
    }
    
    .control-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .close-preview {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* Animace při otevření/zavření */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
    to {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}

.preview-3d.opening {
    animation: modalFadeIn 0.3s ease forwards;
}

.preview-3d.closing {
    animation: modalFadeOut 0.3s ease forwards;
}
