/* AR Viewer Frontend Styles */

.ar-viewer-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.ar-viewer-loading,
.ar-viewer-error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10;
}

.ar-viewer-loading p,
.ar-viewer-error p {
    margin: 20px 0 0 0;
    font-size: 18px;
}

.ar-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ar-spin 1s linear infinite;
}

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

.ar-viewer-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.ar-canvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

.ar-plane-instructions,
.ar-gps-instructions {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px 30px;
    border-radius: 30px;
    z-index: 5;
    font-size: 16px;
    text-align: center;
    max-width: 90%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    animation: ar-fade-in 0.5s ease;
}

@keyframes ar-fade-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.ar-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 15px;
}

.ar-button {
    padding: 12px 28px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ar-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.ar-button:active {
    transform: scale(0.95);
}

.ar-error-message {
    color: #ff6b6b;
    font-size: 16px;
    text-align: center;
    max-width: 80%;
}

/* Crosshair voor plane detection */
.ar-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    z-index: 4;
    pointer-events: none;
}

.ar-crosshair::before,
.ar-crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
}

.ar-crosshair::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
}

.ar-crosshair::after {
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
}

/* GPS indicator */
.ar-gps-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ar-gps-dot {
    width: 10px;
    height: 10px;
    background: #4caf50;
    border-radius: 50%;
    animation: ar-pulse 2s infinite;
}

@keyframes ar-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Object info overlay */
.ar-object-info {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px 25px;
    border-radius: 20px;
    max-width: 80%;
    text-align: center;
    z-index: 5;
    animation: ar-slide-up 0.5s ease;
}

@keyframes ar-slide-up {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.ar-object-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.ar-object-info p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}

/* Responsive design */
@media (max-width: 768px) {
    .ar-viewer-container {
        height: 500px;
        border-radius: 0;
    }
    
    .ar-plane-instructions,
    .ar-gps-instructions {
        font-size: 14px;
        padding: 12px 20px;
    }
    
    .ar-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .ar-controls {
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .ar-viewer-container {
        height: 400px;
    }
    
    .ar-plane-instructions,
    .ar-gps-instructions {
        font-size: 12px;
        padding: 10px 15px;
        top: 10px;
    }
    
    .ar-button {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* Landscape mode voor mobiel */
@media (max-height: 500px) and (orientation: landscape) {
    .ar-viewer-container {
        height: 100vh;
        border-radius: 0;
    }
    
    .ar-plane-instructions,
    .ar-gps-instructions {
        top: 10px;
        font-size: 12px;
        padding: 8px 15px;
    }
    
    .ar-controls {
        bottom: 15px;
    }
}
