/**
 * ParcelView3D Styles
 * 3D Parcel Viewer for LM365
 * @version 1.0.0
 */

/* Tab Switcher */
.pv3d-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    background: #f5f5f5;
}

.pv3d-tab {
    flex: 1;
    padding: 12px 20px;
    background: #f5f5f5;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pv3d-tab:hover {
    background: #e8e8e8;
    color: #333;
}

.pv3d-tab.active {
    background: #fff;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pv3d-tab svg {
    width: 18px;
    height: 18px;
}

/* Map containers */
.pv3d-standard-map {
    width: 100%;
    height: 400px;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.pv3d-standard-map .llp-map-embed {
    height: 100%;
    margin: 0;
}

.pv3d-standard-map .llp-map-embed iframe {
    height: 100% !important;
}

.pv3d-3d-view {
    width: 100%;
    height: 450px;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    background: #0f0f0f;
    display: none;
    position: relative;
}

.pv3d-3d-view.active {
    display: block;
}

/* Fullscreen mode */
#pv3d-viewer:fullscreen,
#pv3d-viewer:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    background: #000;
}

#pv3d-viewer:fullscreen .pv3d-toolbar,
#pv3d-viewer:-webkit-full-screen .pv3d-toolbar {
    bottom: 40px;
}

#pv3d-viewer:fullscreen .pv3d-property-info,
#pv3d-viewer:-webkit-full-screen .pv3d-property-info {
    max-width: 400px;
}

#pv3d-viewer:fullscreen .pv3d-acres-badge-center,
#pv3d-viewer:-webkit-full-screen .pv3d-acres-badge-center {
    top: 40px;
}

/* Google Map 3D Element */
#pv3d-viewer {
    width: 100%;
    height: 100%;
    position: relative;
}

#pv3d-viewer gmp-map-3d {
    width: 100%;
    height: 100%;
    display: block;
}

/* Loading state */
.pv3d-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #fff;
}

.pv3d-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #FFC830;
    border-radius: 50%;
    animation: pv3d-spin 1s linear infinite;
}

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

.pv3d-loading-text {
    margin-top: 15px;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

/* Error state */
.pv3d-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 30px;
    text-align: center;
    color: #fff;
}

.pv3d-error-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.pv3d-error-message {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
}

.pv3d-error-help {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

/* Controls overlay */
.pv3d-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Acres Badge - Top Center */
.pv3d-acres-badge-center {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 18px;
    border-radius: 6px;
    border: 2px solid #FFC830;
    text-align: center;
    pointer-events: none;
    z-index: 100;
}

.pv3d-acres-badge-center .pv3d-acres-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #FFC830;
    line-height: 1;
}

.pv3d-acres-badge-center .pv3d-acres-label {
    display: block;
    font-size: 10px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 2px;
}

/* Acres Badge - Top Right (legacy) */
.pv3d-acres-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 8px;
    border: 2px solid #FFC830;
    text-align: center;
    pointer-events: none;
    z-index: 100;
}

.pv3d-acres-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #FFC830;
    line-height: 1;
}

.pv3d-acres-label {
    display: block;
    font-size: 12px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 4px;
}

/* New Toolbar - Bottom Center */
.pv3d-toolbar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 16px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.15);
    pointer-events: auto;
    z-index: 100;
}

.pv3d-toolbar-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 18px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.pv3d-toolbar-btn:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.08);
    border-color: rgba(255,255,255,0.5);
}

.pv3d-toolbar-btn.pv3d-btn-primary {
    width: 52px;
    height: 52px;
    background: #FFC830;
    color: #000;
}

/* Zoom buttons - dark background with purple +/- symbols */
.pv3d-toolbar-btn.pv3d-zoom-btn {
    background: rgba(60, 60, 60, 0.9) !important;
    color: #a855f7 !important;
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
}

.pv3d-toolbar-btn.pv3d-zoom-btn:hover {
    background: rgba(80, 80, 80, 0.9) !important;
    color: #c084fc !important;
}

/* Also target by title for backwards compatibility */
.pv3d-toolbar-btn[title="Zoom In"],
.pv3d-toolbar-btn[title="Zoom Out"] {
    background: rgba(60, 60, 60, 0.9) !important;
    color: #a855f7 !important;
    font-size: 24px;
    font-weight: bold;
}

.pv3d-toolbar-btn[title="Zoom In"]:hover,
.pv3d-toolbar-btn[title="Zoom Out"]:hover {
    background: rgba(80, 80, 80, 0.9) !important;
    color: #c084fc !important;
}

.pv3d-toolbar-btn.pv3d-btn-primary:hover {
    background: #ffe066;
}

.pv3d-toolbar-btn.pv3d-recording {
    background: #e53935 !important;
    animation: pv3d-pulse 1s infinite;
}

.pv3d-toolbar-btn.active {
    background: #FFC830;
    color: #000;
}

.pv3d-toolbar-divider {
    width: 1px;
    height: 30px;
    background: rgba(255,255,255,0.2);
    margin: 0 4px;
}

/* Old controls - keep for compatibility */
.pv3d-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 16px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.1);
    pointer-events: auto;
    max-width: calc(100% - 40px);
    flex-wrap: wrap;
    justify-content: center;
}

.pv3d-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
}

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

.pv3d-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pv3d-btn-primary {
    width: 48px;
    height: 48px;
    background: #FFC830;
    color: #000;
}

.pv3d-btn-primary:hover {
    background: #ffe066;
}

.pv3d-btn.pv3d-recording {
    background: #e53935;
    animation: pv3d-pulse 1s infinite;
}

@keyframes pv3d-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Property Info Panel */
.pv3d-property-info {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 15, 15, 0.92);
    backdrop-filter: blur(10px);
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 200, 48, 0.3);
    pointer-events: auto;
    max-width: 280px;
}

.pv3d-prop-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
    line-height: 1.2;
}

.pv3d-prop-apn {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

.pv3d-prop-location {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.pv3d-prop-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.pv3d-prop-stats:last-child {
    margin-bottom: 0;
}

.pv3d-stat {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 8px 10px;
    text-align: center;
    min-width: 0;
}

.pv3d-stat-value {
    display: block;
    font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    font-size: 14px;
    font-weight: 700;
    color: #FFC830;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pv3d-stat-value.pv3d-price {
    color: #4CAF50;
}

.pv3d-stat-value.pv3d-monthly {
    color: #FFC830;
}

.pv3d-stat-label {
    display: block;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Legacy badge - keep for backwards compatibility */
.pv3d-info-badge {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 24px;
    border-radius: 8px;
    border: 2px solid #FFC830;
    text-align: center;
    pointer-events: auto;
}

.pv3d-acres {
    display: block;
    font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: #FFC830;
    line-height: 1;
}

.pv3d-acres-label {
    display: block;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 3px;
}

/* Status message */
.pv3d-status {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    pointer-events: none;
    display: none;
}

.pv3d-status.visible {
    display: block;
}

/* Branding */
.pv3d-branding {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    pointer-events: none;
}

.pv3d-branding span {
    color: #FFC830;
    font-weight: 600;
}

/* Hide Cesium UI */
.pv3d-3d-view .cesium-viewer-toolbar,
.pv3d-3d-view .cesium-viewer-animationContainer,
.pv3d-3d-view .cesium-viewer-timelineContainer,
.pv3d-3d-view .cesium-viewer-fullscreenContainer,
.pv3d-3d-view .cesium-viewer-vrContainer,
.pv3d-3d-view .cesium-viewer-geocoderContainer,
.pv3d-3d-view .cesium-viewer-infoBoxContainer,
.pv3d-3d-view .cesium-viewer-selectionIndicatorContainer,
.pv3d-3d-view .cesium-viewer-bottom,
.pv3d-3d-view .cesium-widget-credits {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .pv3d-3d-view {
        height: 70vh;
        min-height: 400px;
    }
    
    .pv3d-standard-map {
        height: 300px;
    }
    
    .pv3d-controls {
        padding: 8px 12px;
        gap: 8px;
    }
    
    .pv3d-btn {
        width: 36px;
        height: 36px;
    }
    
    .pv3d-btn-primary {
        width: 44px;
        height: 44px;
    }
    
    .pv3d-info-badge {
        padding: 8px 18px;
    }
    
    .pv3d-acres {
        font-size: 1.4rem;
    }
    
    .pv3d-tab {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    /* Property info mobile - position at top left, smaller */
    .pv3d-property-info {
        top: 10px !important;
        left: 10px !important;
        bottom: auto !important;
        max-width: 200px !important;
        padding: 8px 10px;
        font-size: 11px;
    }
    
    .pv3d-prop-title {
        font-size: 11px;
        line-height: 1.3;
    }
    
    .pv3d-prop-subtitle {
        font-size: 9px;
    }
    
    .pv3d-prop-stats {
        gap: 4px;
        flex-wrap: wrap;
    }
    
    .pv3d-stat {
        padding: 4px 6px;
        min-width: 70px;
    }
    
    .pv3d-stat-value {
        font-size: 11px;
    }
    
    .pv3d-stat-label {
        font-size: 7px;
    }
    
    /* Acres badge - position top right on mobile */
    .pv3d-acres-badge-center {
        top: 10px !important;
        right: 10px !important;
        left: auto !important;
        transform: none !important;
    }
    
    /* Toolbar - ensure it's visible and not covered */
    .pv3d-toolbar {
        bottom: 15px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 100 !important;
    }
}

/* Admin Boundary Adjustment Controls */
.pv3d-admin-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 200, 48, 0.3);
    pointer-events: auto;
    text-align: center;
    width: 160px;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    box-sizing: border-box;
}

.pv3d-admin-label {
    font-size: 10px;
    color: #FFC830;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tool Tabs */
.pv3d-tool-tabs {
    display: flex;
    gap: 3px;
    margin-bottom: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.pv3d-tool-tab {
    width: 26px;
    height: 26px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.pv3d-tool-tab:hover {
    background: rgba(255, 200, 48, 0.2);
    border-color: rgba(255, 200, 48, 0.4);
}

.pv3d-tool-tab.active {
    background: rgba(255, 200, 48, 0.3);
    border-color: #FFC830;
    color: #FFC830;
}

/* Tool Panels */
.pv3d-tool-panel {
    display: none;
}

.pv3d-tool-panel.active {
    display: block;
}

.pv3d-edit-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 6px;
    margin-bottom: 8px;
}

.pv3d-edit-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pv3d-nudge-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.pv3d-nudge-row {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.pv3d-nudge-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.pv3d-nudge-btn:hover {
    background: rgba(255, 200, 48, 0.3);
}

.pv3d-nudge-btn:active {
    background: rgba(255, 200, 48, 0.5);
}

.pv3d-nudge-center {
    background: rgba(255, 200, 48, 0.2);
    color: #FFC830;
}

.pv3d-corner-indicator {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 200, 48, 0.2);
    border-radius: 5px;
    color: #FFC830;
    font-weight: 600;
    font-size: 12px;
}

.pv3d-corner-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-bottom: 6px;
}

.pv3d-corner-selector select {
    padding: 4px 6px;
    border: 1px solid rgba(255, 200, 48, 0.3);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 10px;
    cursor: pointer;
    width: 70px;
}

.pv3d-corner-selector select:focus {
    outline: none;
    border-color: #FFC830;
}

.pv3d-corner-selector select option {
    background: #1a1a1a;
    color: #fff;
}

.pv3d-corner-actions {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    justify-content: center;
}

.pv3d-small-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pv3d-small-btn:hover {
    background: rgba(255, 200, 48, 0.3);
}

.pv3d-btn-danger:hover {
    background: rgba(229, 57, 53, 0.5);
}

.pv3d-save-btn {
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 5px;
    background: #FFC830;
    color: #000;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 5px;
}

.pv3d-save-btn:hover {
    background: #ffe066;
}

.pv3d-save-btn:active {
    transform: scale(0.98);
}

.pv3d-admin-hint {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.4);
    margin: 6px 0 0 0;
    font-style: italic;
}

.pv3d-mouse-hint {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    padding: 4px 6px;
    margin-top: 6px;
    font-size: 8px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.3;
}

.pv3d-mouse-hint strong {
    color: #FFC830;
}

/* Camera info styling */
.pv3d-camera-info {
    font-size: 10px;
    line-height: 1.3;
    margin-bottom: 6px;
}

.pv3d-camera-stat {
    margin-bottom: 2px;
}

/* Height display */
.pv3d-height-display {
    font-size: 11px;
    color: #fff;
    margin-bottom: 8px;
}

.pv3d-height-display span {
    color: #FFC830;
    font-weight: 600;
}

/* Mobile admin controls */
@media (max-width: 768px) {
    .pv3d-admin-controls {
        top: auto;
        bottom: 90px;
        right: 10px;
        padding: 10px 12px;
        min-width: 140px;
        max-height: 50vh;
    }
    
    .pv3d-admin-label {
        font-size: 10px;
        margin-bottom: 8px;
    }
    
    .pv3d-nudge-btn {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
    
    .pv3d-corner-indicator {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .pv3d-save-btn {
        font-size: 11px;
        padding: 8px 10px;
    }
    
    .pv3d-small-btn {
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* Boundary Disclaimer */
.pv3d-disclaimer {
    margin: 10px 0 0 0;
    padding: 10px 15px;
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ffc107;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

.pv3d-disclaimer em {
    font-style: normal;
}

/* Tracer Button */
.pv3d-tracer-btn {
    width: 100%;
    padding: 8px 10px;
    border: 2px dashed rgba(255, 200, 48, 0.5);
    border-radius: 5px;
    background: rgba(255, 200, 48, 0.1);
    color: #FFC830;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 8px;
}

.pv3d-tracer-btn:hover {
    background: rgba(255, 200, 48, 0.25);
    border-color: #FFC830;
}

/* Shape Tracer Modal */
.pv3d-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pv3d-modal-content {
    background: #1a1a1a;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.pv3d-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pv3d-modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
}

.pv3d-modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.pv3d-modal-close:hover {
    color: #fff;
}

.pv3d-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.pv3d-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.pv3d-btn-secondary {
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.pv3d-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.pv3d-modal-footer .pv3d-btn-primary {
    padding: 10px 28px;
    border: none;
    border-radius: 6px;
    background: #FFC830;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    width: auto;
    height: auto;
    min-width: 120px;
}

.pv3d-modal-footer .pv3d-btn-primary:hover {
    background: #ffe066;
}

/* Tracer specific styles */
.tracer-instructions {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 15px 0;
    font-size: 14px;
}

.tracer-upload-area {
    border: 2px dashed rgba(255, 200, 48, 0.3);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    transition: all 0.2s ease;
}

.tracer-upload-area.dragover {
    border-color: #FFC830;
    background: rgba(255, 200, 48, 0.1);
}

.tracer-upload-area p {
    color: rgba(255, 255, 255, 0.4);
    margin: 10px 0 0 0;
    font-size: 13px;
}

.pv3d-upload-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    background: #FFC830;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Make icon black/dark on yellow button */
.pv3d-upload-btn svg {
    stroke: #000 !important;
    color: #000 !important;
    fill: none !important;
}

.pv3d-upload-btn svg circle,
.pv3d-upload-btn svg rect,
.pv3d-upload-btn svg polyline,
.pv3d-upload-btn svg path,
.pv3d-upload-btn svg line {
    stroke: #000 !important;
}

.pv3d-upload-btn .dashicons {
    color: #000 !important;
}

.pv3d-upload-btn:hover {
    background: #ffe066;
    transform: scale(1.02);
}

.tracer-canvas-container {
    margin: 15px 0;
    text-align: center;
}

#tracer-canvas {
    display: none;
    max-width: 100%;
    border-radius: 8px;
    cursor: crosshair;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tracer-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.tracer-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 14px;
}

.tracer-scale-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tracer-scale-input label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.tracer-scale-input input {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
}

.tracer-scale-input input:focus {
    outline: none;
    border-color: #FFC830;
}

/* Mobile tracer */
@media (max-width: 768px) {
    .pv3d-modal-content {
        max-height: 95vh;
    }
    
    .tracer-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tracer-info {
        justify-content: center;
    }
    
    .tracer-scale-input {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tracer-scale-input input {
        width: 100%;
    }
}

/* iOS Simulated Fullscreen - since iOS doesn't support Fullscreen API */
.pv3d-ios-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    background: #000 !important;
    border-radius: 0 !important;
}

.pv3d-ios-fullscreen #pv3d-viewer {
    width: 100% !important;
    height: 100% !important;
}

.pv3d-ios-fullscreen .pv3d-toolbar {
    bottom: 30px !important;
}

.pv3d-ios-fullscreen .pv3d-property-info {
    max-width: 300px !important;
}

/* Hide page content when in iOS fullscreen */
body.pv3d-fullscreen-active {
    overflow: hidden !important;
}

body.pv3d-fullscreen-active > *:not(.pv3d-ios-fullscreen) {
    visibility: hidden;
}
