/* ============================================================
   ZÊNIT — Simulador 3D de Culturas
   Arquivo: simulador3d.css
   Inserir via: <link rel="stylesheet" href="simulador3d.css">
   ============================================================ */

#simulador-3d-wrap {
    width: 100%;
    background: #0a1a0a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    font-family: 'Segoe UI', sans-serif;
    position: relative;
}

/* ── CANVAS ── */
#sim3d-canvas {
    width: 100%;
    height: 420px;
    display: block;
    cursor: grab;
}
#sim3d-canvas:active { cursor: grabbing; }

/* ── PAINEL DE CONTROLES ── */
#sim3d-controls {
    background: #0f2210;
    padding: 18px 20px 14px;
    border-top: 1px solid #1f4020;
}

.sim3d-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 14px;
}

.sim3d-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 130px;
}

.sim3d-group label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #66bb6a;
}

.sim3d-select,
.sim3d-range {
    width: 100%;
    background: #1a3320;
    border: 1px solid #2e5c30;
    border-radius: 8px;
    color: #e0f2e0;
    font-size: 13px;
    padding: 7px 10px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2366bb6a' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.sim3d-select:focus,
.sim3d-select:hover { border-color: #66bb6a; }

.sim3d-range {
    background-image: none;
    padding: 0;
    height: 6px;
    border-radius: 4px;
    accent-color: #43a047;
    cursor: pointer;
    background: linear-gradient(to right, #43a047 var(--val, 50%), #2e5c30 var(--val, 50%));
}

.sim3d-range-val {
    font-size: 11px;
    color: #a5d6a7;
    text-align: right;
    margin-top: 2px;
}

.sim3d-btn-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.sim3d-btn {
    background: #1b5e20;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}
.sim3d-btn:hover  { background: #2e7d32; }
.sim3d-btn:active { transform: scale(0.97); }
.sim3d-btn.outline {
    background: transparent;
    border: 1.5px solid #2e5c30;
    color: #a5d6a7;
}
.sim3d-btn.outline:hover { border-color: #66bb6a; color: #c8e6c9; background: #1a3320; }

/* ── BADGE DE STATUS ── */
#sim3d-status {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}

.sim3d-badge {
    background: rgba(10,26,10,0.82);
    border: 1px solid rgba(67,160,71,0.4);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11px;
    color: #a5d6a7;
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.sim3d-badge span { color: #66bb6a; }

/* ── LEGENDA DE ESTÁGIO ── */
#sim3d-estagio-label {
    position: absolute;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(102,187,106,0.35);
    backdrop-filter: blur(6px);
    color: #c8e6c9;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 30px;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.5s;
    letter-spacing: 0.04em;
}

/* ── INFO TOOLTIP ── */
#sim3d-info {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(10,26,10,0.82);
    border: 1px solid rgba(67,160,71,0.3);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 10px 14px;
    color: #a5d6a7;
    font-size: 11.5px;
    line-height: 1.7;
    max-width: 180px;
    pointer-events: none;
}
#sim3d-info strong { color: #66bb6a; display: block; margin-bottom: 2px; font-size: 12px; }

/* ── LOADING ── */
#sim3d-loading {
    position: absolute;
    inset: 0;
    background: #0a1a0a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: opacity 0.6s;
}
#sim3d-loading.oculto { opacity: 0; pointer-events: none; }

.sim3d-spinner {
    width: 44px; height: 44px;
    border: 3px solid #1f4020;
    border-top-color: #43a047;
    border-radius: 50%;
    animation: sim3dSpin 0.9s linear infinite;
}
@keyframes sim3dSpin { to { transform: rotate(360deg); } }

#sim3d-loading p {
    color: #66bb6a;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    margin: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
    #sim3d-canvas  { height: 300px; }
    .sim3d-group   { min-width: 100px; }
    #sim3d-info    { display: none; }
    #sim3d-estagio-label { font-size: 11px; bottom: 130px; }
}
