/**
 * 3D Modell Megjelenítő - Frontend stílusok
 *
 * @since 1.0.0
 */

/* Fő konténer */
.j3dv-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f0f0f0;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.j3dv-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    outline: none;
}

/* Betöltési overlay */
.j3dv-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(240, 240, 240, 0.95);
    z-index: 10;
    transition: opacity 0.4s ease;
}

.j3dv-loading.j3dv-loaded {
    opacity: 0;
    pointer-events: none;
}

/* Előnézeti kép */
.j3dv-loading-thumbnail {
    max-width: 60%;
    max-height: 50%;
    object-fit: contain;
    margin-bottom: 16px;
    border-radius: 4px;
    opacity: 0.6;
}

/* Töltés spinner */
.j3dv-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #ddd;
    border-top-color: #0073aa;
    border-radius: 50%;
    animation: j3dv-spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes j3dv-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Betöltési szöveg */
.j3dv-loading-text {
    font-size: 14px;
    color: #666;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Hiba üzenet */
.j3dv-error {
    color: #d63638;
    background: #fcf0f1;
    padding: 12px 16px;
    border-left: 4px solid #d63638;
    border-radius: 4px;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 600px) {
    .j3dv-container {
        height: 300px !important;
    }
}

/* ============================
   Toolbar - forgatas + zoom
   ============================ */
.j3dv-toolbar {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 20;
    opacity: 0.85;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: auto;
}

.j3dv-toolbar-hidden {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

.j3dv-container:hover .j3dv-toolbar-hidden {
    opacity: 0.85;
    transform: translateY(0);
    pointer-events: auto;
}

/* Forgatas csoport */
.j3dv-toolbar-rotate {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.j3dv-toolbar-row {
    display: flex;
    gap: 2px;
}

/* Zoom csoport */
.j3dv-toolbar-zoom {
    display: flex;
    gap: 2px;
    justify-content: center;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 6px;
}

/* Gombok */
.j3dv-toolbar-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 13px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    font-family: Arial, sans-serif;
}

.j3dv-toolbar-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.j3dv-toolbar-btn:active {
    background: rgba(0, 115, 170, 0.8);
    transform: scale(0.92);
}

/* Zoom gombok szelessege */
.j3dv-btn-zoomin,
.j3dv-btn-zoomout {
    width: 48px;
    font-size: 18px;
    font-weight: bold;
}

/* Mobil: kicsit nagyobb gombok */
@media (max-width: 600px) {
    .j3dv-toolbar-btn {
        width: 36px;
        height: 36px;
        line-height: 36px;
        font-size: 14px;
    }
    .j3dv-btn-zoomin,
    .j3dv-btn-zoomout {
        width: 54px;
        font-size: 20px;
    }
}
