/**
 * Tyralix WebAR Public Styles
 *
 * @package Tyralix_WebAR
 */

/* ==========================================================================
   AR Button
   ========================================================================== */

.tyralix-webar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.tyralix-webar-button.button.alt {
    background-color: var(--woocommerce-primary, #7f54b3);
    color: #fff;
}

.tyralix-webar-button.button.alt:hover {
    background-color: var(--woocommerce-primary-dark, #6a4794);
}

.tyralix-webar-button.button:not(.alt) {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.tyralix-webar-button.button:not(.alt):hover {
    background-color: #e5e5e5;
}

.tyralix-webar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tyralix-webar-icon svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Model Viewer
   ========================================================================== */

.tyralix-webar-viewer {
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.tyralix-ar-button,
.tyralix-ar-button-inner,
.tyralix-ar-slot-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--woocommerce-primary, #7f54b3);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tyralix-ar-button:hover,
.tyralix-ar-button-inner:hover,
.tyralix-ar-slot-button:hover {
    background: var(--woocommerce-primary-dark, #6a4794);
}

.tyralix-ar-button svg,
.tyralix-ar-button-inner svg,
.tyralix-ar-slot-button svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Loading Indicator
   ========================================================================== */

.tyralix-loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
}

.tyralix-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e5e5;
    border-top-color: var(--woocommerce-primary, #7f54b3);
    border-radius: 50%;
    animation: tyralix-spin 0.8s linear infinite;
}

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

.tyralix-loading-indicator span {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

/* ==========================================================================
   Modal
   ========================================================================== */

body.tyralix-modal-open {
    overflow: hidden !important;
}

.tyralix-webar-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tyralix-webar-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
}

.tyralix-webar-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.tyralix-webar-modal.fullscreen .tyralix-webar-modal-content {
    width: 100%;
    max-width: none;
    height: 100vh;
    max-height: none;
    border-radius: 0;
}

/* Modal Header */
.tyralix-webar-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.tyralix-webar-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.tyralix-webar-modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tyralix-modal-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tyralix-modal-action-btn:hover {
    background: #e5e5e5;
    transform: scale(1.05);
}

.tyralix-modal-action-btn.capturing {
    animation: tyralix-pulse 0.5s ease;
}

@keyframes tyralix-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.95); }
}

.tyralix-modal-action-btn svg {
    width: 20px;
    height: 20px;
    color: #333;
}

.tyralix-close-btn:hover {
    background: #ffebee;
}

.tyralix-close-btn:hover svg {
    color: #d32f2f;
}

/* ==========================================================================
   Share Menu
   ========================================================================== */

.tyralix-share-wrapper {
    position: relative;
}

.tyralix-share-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 180px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 10;
}

.tyralix-share-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tyralix-share-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tyralix-share-option:first-child {
    border-radius: 8px 8px 0 0;
}

.tyralix-share-option:last-child {
    border-radius: 0 0 8px 8px;
}

.tyralix-share-option:hover {
    background: #f5f5f5;
}

.tyralix-share-option svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ==========================================================================
   Modal Body
   ========================================================================== */

.tyralix-webar-modal-body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

#tyralix-modal-viewer-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

#tyralix-modal-viewer-container model-viewer {
    width: 100%;
    height: 100%;
    min-height: 400px;
    --poster-color: #f5f5f5;
}

.tyralix-webar-modal.fullscreen #tyralix-modal-viewer-container {
    min-height: calc(100vh - 140px);
}

/* ==========================================================================
   Viewer Controls
   ========================================================================== */

.tyralix-viewer-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

.tyralix-scale-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tyralix-scale-control label {
    display: flex;
    align-items: center;
    color: #666;
}

.tyralix-scale-control label svg {
    width: 16px;
    height: 16px;
}

#tyralix-scale-slider {
    width: 100px;
    height: 4px;
    -webkit-appearance: none;
    background: #ddd;
    border-radius: 2px;
    outline: none;
}

#tyralix-scale-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--woocommerce-primary, #7f54b3);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#tyralix-scale-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

#tyralix-scale-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--woocommerce-primary, #7f54b3);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

#tyralix-scale-value {
    min-width: 45px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.tyralix-reset-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: #f5f5f5;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tyralix-reset-view-btn:hover {
    background: #e5e5e5;
}

.tyralix-reset-view-btn svg {
    width: 16px;
    height: 16px;
    color: #666;
}

/* ==========================================================================
   QR Code Container
   ========================================================================== */

.tyralix-qr-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    z-index: 5;
    max-width: 180px;
}

.tyralix-qr-content h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.tyralix-qr-content p {
    margin: 0 0 15px;
    font-size: 12px;
    color: #666;
}

#tyralix-qr-code {
    display: flex;
    justify-content: center;
}

#tyralix-qr-code img,
#tyralix-qr-code canvas {
    border-radius: 8px;
}

/* ==========================================================================
   Modal Footer
   ========================================================================== */

.tyralix-webar-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #fff;
}

.tyralix-webar-modal-footer-actions {
    display: flex;
    gap: 10px;
}

.tyralix-webar-instructions p {
    margin: 0;
    color: #666;
    font-size: 13px;
    display: flex;
    align-items: center;
}

.tyralix-webar-instructions svg {
    color: #999;
    margin-right: 8px;
    flex-shrink: 0;
}

.tyralix-ar-launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--woocommerce-primary, #7f54b3);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tyralix-ar-launch-btn:hover {
    background: var(--woocommerce-primary-dark, #6a4794);
    transform: translateY(-1px);
}

.tyralix-ar-launch-btn svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Screenshot Preview
   ========================================================================== */

.tyralix-screenshot-preview {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tyralix-screenshot-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
}

.tyralix-screenshot-preview-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    text-align: center;
}

.tyralix-screenshot-preview-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.tyralix-screenshot-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.tyralix-screenshot-actions button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tyralix-download-btn,
.tyralix-share-screenshot-btn {
    background: var(--woocommerce-primary, #7f54b3);
    color: #fff;
    border: none;
}

.tyralix-download-btn:hover,
.tyralix-share-screenshot-btn:hover {
    background: var(--woocommerce-primary-dark, #6a4794);
}

.tyralix-close-preview-btn {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.tyralix-close-preview-btn:hover {
    background: #e5e5e5;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.tyralix-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    background: #333;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99999999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.tyralix-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Tab Content
   ========================================================================== */

.tyralix-webar-tab-content {
    padding: 20px 0;
}

.tyralix-webar-inline-viewer {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.tyralix-webar-inline-viewer model-viewer {
    width: 100%;
    height: 400px;
}

.tyralix-webar-tab-instructions {
    background: #f9f9f9;
    padding: 15px 20px;
    border-radius: 6px;
}

.tyralix-webar-tab-instructions h4 {
    margin: 0 0 10px;
    font-size: 14px;
}

.tyralix-webar-tab-instructions ul {
    margin: 0;
    padding: 0 0 0 20px;
}

.tyralix-webar-tab-instructions li {
    margin-bottom: 5px;
    font-size: 13px;
    color: #666;
}

.tyralix-webar-tab-instructions li:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   AR Not Supported Message
   ========================================================================== */

.tyralix-ar-not-supported {
    display: none;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
    margin-top: 10px;
}

.tyralix-ar-not-supported.visible {
    display: block;
}

/* Desktop indicator */
body.tyralix-desktop .tyralix-ar-launch-btn {
    display: none;
}

/* QR container visibility is controlled by JS showDesktopQRCode() */

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .tyralix-webar-modal-content {
        width: 100%;
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }

    .tyralix-webar-modal-header {
        padding: 12px 15px;
    }

    .tyralix-webar-modal-title {
        font-size: 16px;
    }

    .tyralix-modal-action-btn {
        width: 36px;
        height: 36px;
    }

    .tyralix-modal-action-btn svg {
        width: 18px;
        height: 18px;
    }

    .tyralix-webar-modal-footer {
        flex-direction: column;
        gap: 15px;
        padding: 12px 15px;
    }

    .tyralix-webar-instructions {
        text-align: center;
    }

    .tyralix-ar-launch-btn {
        width: 100%;
        justify-content: center;
    }

    #tyralix-modal-viewer-container {
        min-height: 300px;
    }

    .tyralix-webar-inline-viewer model-viewer {
        height: 300px;
    }

    .tyralix-viewer-controls {
        left: 10px;
        bottom: 10px;
        padding: 8px 12px;
    }

    #tyralix-scale-slider {
        width: 80px;
    }

    .tyralix-qr-container {
        position: static;
        transform: none;
        margin: 20px;
    }

    .tyralix-share-menu {
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
    }

    .tyralix-share-menu.active {
        transform: translateX(-50%) translateY(0);
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .tyralix-webar-viewer {
        background-color: #2d2d2d;
    }

    .tyralix-loading-indicator {
        background: #2d2d2d;
    }

    .tyralix-loading-indicator span {
        color: #aaa;
    }

    .tyralix-spinner {
        border-color: #444;
        border-top-color: var(--woocommerce-primary, #7f54b3);
    }

    .tyralix-webar-modal-content {
        background: #1a1a1a;
    }

    .tyralix-webar-modal-header,
    .tyralix-webar-modal-footer {
        background: #1a1a1a;
        border-color: #333;
    }

    .tyralix-webar-modal-title {
        color: #fff;
    }

    .tyralix-modal-action-btn {
        background: #333;
    }

    .tyralix-modal-action-btn:hover {
        background: #444;
    }

    .tyralix-modal-action-btn svg {
        color: #fff;
    }

    .tyralix-share-menu {
        background: #2d2d2d;
    }

    .tyralix-share-option {
        color: #fff;
    }

    .tyralix-share-option:hover {
        background: #333;
    }

    .tyralix-viewer-controls {
        background: rgba(45, 45, 45, 0.95);
    }

    .tyralix-scale-control label {
        color: #aaa;
    }

    #tyralix-scale-slider {
        background: #444;
    }

    #tyralix-scale-value {
        color: #fff;
    }

    .tyralix-reset-view-btn {
        background: #444;
    }

    .tyralix-reset-view-btn:hover {
        background: #555;
    }

    .tyralix-reset-view-btn svg {
        color: #fff;
    }

    .tyralix-qr-container {
        background: #2d2d2d;
    }

    .tyralix-qr-content h4 {
        color: #fff;
    }

    .tyralix-qr-content p {
        color: #aaa;
    }

    .tyralix-webar-instructions p {
        color: #aaa;
    }

    .tyralix-toast {
        background: #fff;
        color: #333;
    }
}

/* ==========================================================================
   Product Info Panel
   ========================================================================== */

.tyralix-product-info-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 5;
    max-width: 280px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tyralix-product-info-panel.collapsed .tyralix-product-info-content {
    display: none;
}

.tyralix-product-info-header {
    padding: 12px;
    display: flex;
    justify-content: flex-end;
}

.tyralix-product-info-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: #f5f5f5;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tyralix-product-info-toggle:hover {
    background: #e5e5e5;
}

.tyralix-product-info-toggle svg {
    width: 14px;
    height: 14px;
    color: #666;
}

.tyralix-product-info-content {
    padding: 0 16px 16px;
}

.tyralix-product-info-name {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.tyralix-product-info-price {
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--woocommerce-primary, #7f54b3);
}

.tyralix-product-info-price del {
    font-size: 14px;
    color: #999;
    font-weight: 400;
    margin-right: 8px;
}

.tyralix-product-info-price ins {
    text-decoration: none;
}

.tyralix-product-info-dimensions,
.tyralix-product-info-sku {
    display: flex;
    gap: 6px;
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.tyralix-dimension-label,
.tyralix-sku-label {
    color: #999;
}

/* ==========================================================================
   Measurements Overlay
   ========================================================================== */

.tyralix-measurements-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 4;
}

.tyralix-measurement {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tyralix-measurement-width {
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: column;
}

.tyralix-measurement-height {
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: row;
    writing-mode: vertical-rl;
}

.tyralix-measurement-depth {
    bottom: 80px;
    right: 80px;
    transform: rotate(-45deg);
}

.tyralix-measurement-line {
    display: block;
    background: rgba(127, 84, 179, 0.5);
}

.tyralix-measurement-width .tyralix-measurement-line {
    width: 120px;
    height: 2px;
}

.tyralix-measurement-height .tyralix-measurement-line {
    width: 2px;
    height: 120px;
}

.tyralix-measurement-depth .tyralix-measurement-line {
    width: 80px;
    height: 2px;
}

.tyralix-measurement-value {
    padding: 3px 8px;
    background: var(--woocommerce-primary, #7f54b3);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    white-space: nowrap;
}

/* ==========================================================================
   Scale Indicator
   ========================================================================== */

.tyralix-scale-indicator {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 4;
}

.tyralix-scale-bar {
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.tyralix-scale-bar-fill {
    display: block;
    width: 50px;
    height: 100%;
    background: var(--woocommerce-primary, #7f54b3);
    transition: width 0.3s ease;
}

.tyralix-scale-label {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    padding: 3px 8px;
    border-radius: 4px;
}

/* ==========================================================================
   Floating Toolbar
   ========================================================================== */

.tyralix-floating-toolbar {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

.tyralix-toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tyralix-toolbar-btn:hover {
    background: #e5e5e5;
    transform: scale(1.05);
}

.tyralix-toolbar-btn[data-active="true"] {
    background: var(--woocommerce-primary, #7f54b3);
    color: #fff;
}

.tyralix-toolbar-btn[data-active="true"] svg {
    color: #fff;
}

.tyralix-toolbar-btn svg {
    width: 18px;
    height: 18px;
    color: #666;
}

.tyralix-toolbar-btn span {
    font-size: 12px;
    font-weight: 700;
    color: #666;
}

.tyralix-toolbar-btn[data-active="true"] span {
    color: #fff;
}

.tyralix-view-presets {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid #e5e5e5;
}

.tyralix-view-presets .tyralix-toolbar-btn {
    width: 28px;
    height: 28px;
}

/* ==========================================================================
   Hotspots
   ========================================================================== */

.tyralix-hotspot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--woocommerce-primary, #7f54b3);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tyralix-hotspot:hover {
    transform: scale(1.2);
}

.tyralix-hotspot svg {
    width: 14px;
    height: 14px;
    color: #fff;
}

.tyralix-hotspot-annotation {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.tyralix-hotspot:hover .tyralix-hotspot-annotation {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   AR Scene Indicator
   ========================================================================== */

.tyralix-ar-scene-indicator {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    z-index: 5;
}

.tyralix-ar-scene-indicator svg {
    width: 16px;
    height: 16px;
}

.tyralix-ar-scene-indicator.placing {
    background: var(--woocommerce-primary, #7f54b3);
}

.tyralix-ar-scene-indicator.placed {
    background: #4caf50;
}

/* ==========================================================================
   Mobile Toolbar Adjustments
   ========================================================================== */

@media (max-width: 768px) {
    .tyralix-product-info-panel {
        top: 10px;
        left: 10px;
        max-width: 200px;
    }

    .tyralix-product-info-name {
        font-size: 14px;
    }

    .tyralix-product-info-price {
        font-size: 16px;
    }

    .tyralix-floating-toolbar {
        right: 10px;
        padding: 8px;
    }

    .tyralix-toolbar-btn {
        width: 32px;
        height: 32px;
    }

    .tyralix-toolbar-btn svg {
        width: 16px;
        height: 16px;
    }

    .tyralix-measurements-overlay {
        display: none;
    }

    .tyralix-scale-indicator {
        bottom: 70px;
    }

    .tyralix-view-presets {
        display: none;
    }
}

/* ==========================================================================
   Dark Mode for New Elements
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .tyralix-product-info-panel {
        background: rgba(45, 45, 45, 0.95);
    }

    .tyralix-product-info-toggle {
        background: #444;
    }

    .tyralix-product-info-toggle:hover {
        background: #555;
    }

    .tyralix-product-info-toggle svg {
        color: #fff;
    }

    .tyralix-product-info-name {
        color: #fff;
    }

    .tyralix-product-info-dimensions,
    .tyralix-product-info-sku {
        color: #aaa;
    }

    .tyralix-dimension-label,
    .tyralix-sku-label {
        color: #888;
    }

    .tyralix-floating-toolbar {
        background: rgba(45, 45, 45, 0.95);
    }

    .tyralix-toolbar-btn {
        background: #444;
    }

    .tyralix-toolbar-btn:hover {
        background: #555;
    }

    .tyralix-toolbar-btn svg,
    .tyralix-toolbar-btn span {
        color: #fff;
    }

    .tyralix-view-presets {
        border-color: #444;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .tyralix-webar-button,
    .tyralix-webar-viewer,
    .tyralix-webar-modal {
        display: none !important;
    }
}
