/* Estilos para o Croqui Dinâmico Inteligente */

.croqui-container {
    background: #0f172a;
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.croqui-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.croqui-title {
    color: #00d4ff;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.croqui-selector {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.croqui-svg-wrapper {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    background: #1e293b;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.croqui-svg-wrapper svg {
    width: 90%;
    height: 90%;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

/* Interatividade das Peças do Croqui */
.croqui-part {
    fill: #334155;
    stroke: #94a3b8;
    stroke-width: 2;
    transition: all 0.3s ease;
    cursor: pointer;
}

.croqui-part:hover {
    fill: #475569;
    stroke: #00d4ff;
    filter: drop-shadow(0 0 5px rgba(0,212,255,0.5));
}

.croqui-part.selected {
    stroke: #00d4ff;
    stroke-width: 3;
    stroke-dasharray: 5,5;
    animation: dash 10s linear infinite;
}

/* Status Colors (Integrado com o Ultrassom) */
.croqui-part.status-ok { fill: rgba(16, 185, 129, 0.6); stroke: #10b981; }
.croqui-part.status-warning { fill: rgba(245, 158, 11, 0.6); stroke: #f59e0b; }
.croqui-part.status-danger { fill: rgba(239, 68, 68, 0.6); stroke: #ef4444; }

@keyframes dash {
  to { stroke-dashoffset: -100; }
}

/* Painel Lateral de Medição flutuante */
.croqui-measurement-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 212, 255, 0.3);
    padding: 16px;
    border-radius: 12px;
    display: none; /* Só mostra quando seleciona uma parte */
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 10;
}

.croqui-measurement-panel.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cmp-title {
    font-size: 0.9rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cmp-part-name {
    font-size: 1.2rem;
    color: white;
    font-weight: 600;
}

.cmp-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cmp-input-group input {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px;
    border-radius: 6px;
    width: 100px;
    font-size: 1.1rem;
    text-align: right;
}

.cmp-input-group span {
    color: #94a3b8;
}

.cmp-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.cmp-btn {
    background: #00d4ff;
    color: #0f172a;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.cmp-btn:hover { background: #00b3d6; }

/* Labels SVG */
.croqui-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    fill: #ffffff;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
