/* assets/css/orcamento-planta.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* { box-sizing: border-box; }

html,body{
  width: 100%;
  height: 100%;
}
body {
  background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  color: #2d3748;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.op-wrapper {
  background: #ffffff;
  border-radius: 24px;
  padding: 48px;
  margin: 24px auto;
  width: 90%; /* Tamanho do Container, so alterar aqui */
  max-width: 1500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 8px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
}

.op-title {
  color: #EC611E;
  font-size: 38px;
  text-align: center;
  margin: 0 0 28px;
  font-weight: 800;
  letter-spacing: -0.8px;
  background: linear-gradient(to right, #EC611E, #ff8c00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.op-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 24px;
  margin-bottom: 32px;
  align-items: end;
}

.op-tool-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 16px 0;
  grid-column: 1 / -1;
}

.op-btn {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  padding: 11px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.op-btn:hover {
  background: #eef2ff;
  border-color: #EC611E;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.2);
}

.op-btn.active {
  background: #EC611E;
  color: white;
  border-color: #4338ca;
  box-shadow: 0 4px 14px rgba(79,70,229,0.4);
}

.op-btn.primary {
  background: linear-gradient(135deg, #EC611E, #ff8c00);
  color: white;
  border: none;
  font-weight: 700;
  padding: 13px 20px;
  font-size: 15px;
}

.op-btn.primary:hover {
  background: linear-gradient(135deg, #EC611E, #ff8c00);
  transform: translateY(-1px);
}

.op-canvas-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 4px solid #e0e7ff;
  background: #f8fafc;
  box-shadow: inset 0 4px 12px rgba(0,0,0,0.06);
  margin-top: 32px;
  min-height: 650px; /* remova o "aspect-ratio: 16 / 10;" que estava aqui */
}

#op-canvas {
  background-image:
    linear-gradient(#cbd5e1 1px, transparent 1px),
    linear-gradient(90deg, #cbd5e1 1px, transparent 1px);
  background-size: 15px 15px;
  width: 100%;
  display: block;
  max-width: 100%;
}

.op-result, .op-selected-info {
  padding: 24px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  min-height: 64px;
  font-size: 15px;
  line-height: 1.6;
  background: #f8fafc;
  grid-column: 1 / -1;
}

.op-result {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border-color: #86efac;
  font-weight: 600;
  color: #166534;
}

label {
  font-weight: 600;
  font-size: 15px;
  color: #374151;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

input[type="number"], select {
  padding: 14px 18px;
  border-radius: 10px;
  border: 1.5px solid #94a3b8;
  font-size: 15px;
  background: white;
  transition: all 0.2s;
  width: 100%;
  
}

input:focus, select:focus {
  outline: none;
  border-color: #EC611E;
  box-shadow: 0 0 0 4px rgba(251, 137, 38, 0.2);
}

/* Medida flutuante DENTRO do canvas */
.measure-label {
  position: absolute;
  background: rgba(15, 23, 42, 0.88);
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  backdrop-filter: blur(4px);
 border: 1px solid rgba(255,255,255,0.2);
  transform: translate(-50%, -120%);
}
/* ------------------------ */
/*        FOOTER MODERNO    */
/* ------------------------ */

.op-footer {
  background: #154A7E;
  color: #e2e8f0;
  padding: 40px 20px 20px;
  margin-top: 40px;
  font-family: Arial, sans-serif;
}

.op-footer-container {
  width: 100%;
  max-width: 1320px; 
  margin: auto;
  display: flex;
  flex-wrap: wrap; 
  justify-content: space-between;
  gap: 30px;
}

/* Logo e texto */
.op-footer-logo {
  width: 70px;
  height: auto;
  border-radius: 6px;
  margin-bottom: 10px;
}

.op-footer-brand {
  max-width: 250px;
}

.op-footer-title {
  font-size: 18px;
  margin: 5px 0 2px;
  color: #fff;
}

.op-footer-desc {
  font-size: 14px;
  opacity: 0.8;
}

/* Contato */
.op-footer-contact h4,
.op-footer-social h4 {
  margin-bottom: 10px;
  color: #f1f5f9;
  font-size: 16px;
}

.op-footer-contact p {
  margin: 4px 0;
  font-size: 14px;
}

/* Redes sociais */
.op-social-links a {
  font-size: 22px;
  margin-right: 12px;
  opacity: 0.8;
  text-decoration: none;
  color: #ffffff;
  transition: 0.3s;
}

.op-social-links a:hover {
  opacity: 1;
}

/* Rodapé inferior */
.op-footer-bottom {
  text-align: center;
  margin-top: 35px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  opacity: 0.6;
  font-size: 13px;
}



/* Remover padding/margin padrão de footer do tema */
/* ================================== */
/* TESTE SOBREPOSIÇÃO FOOTER (ELEMENTOR)     */
/* ================================== */

.site-footer,
.elementor-location-footer,
.elementor-section.elementor-section-stretched {
    padding: 0 !important;
    margin: 0 !important;
}

/* Legenda da escala da grade */
.scale-legend {
  position: absolute;
  bottom: 12px;
  right: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #4b5563;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

/* Coordenadas do mouse */
.mouse-coords {
  position: absolute;
  top: 12px;
  left: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #4b5563;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

/* ================================== */
/* RESPONSIVIDADE - MOBILE FIRST     */
/* ================================== */

/* ========== SMARTPHONE (até 576px) ========== */
@media (max-width: 576px) {
  
  /* 1. Wrapper Full Responsive */
  .op-wrapper {
    width: 100% !important;
    padding: 16px 12px !important;
    margin: 8px auto !important;
    border-radius: 12px;
    max-width: 100vw;
  }

  /* 2. Título Adaptativo */
  .op-title {
    font-size: 22px !important;
    margin-bottom: 18px !important;
    word-break: break-word;
  }

  /* 3. Controles Empilhados */
  .op-controls {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Labels com texto menor */
  label {
    font-size: 13px !important;
    gap: 4px;
  }

  input[type="number"], select {
    padding: 10px 12px !important;
    font-size: 16px; /* Evita zoom automático no iOS */
  }

  /* 4. Botão Primário Full Width */
  #op-calc {
    width: 100% !important;
    padding: 13px 16px !important;
    font-size: 14px;
    margin-top: 8px;
  }

  /* 5. Tool Buttons - Grid 2 colunas (melhor para toque) */
  .op-tool-buttons {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100%;
  }

  .op-tool-buttons .op-btn {
    padding: 11px 8px !important;
    font-size: 12px !important;
    min-height: 42px; /* Mínimo de toque acessível (44px é o padrão) */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* 6. Botões Especiais Full Width */
  #op-export-pdf, 
  #op-delete,
  #op-clear {
    grid-column: 1 / -1;
    width: 100% !important;
    padding: 12px 16px !important;
    margin-top: 8px;
  }

  /* 7. Resultado */
  .op-result {
    grid-column: 1 / -1;
    font-size: 13px !important;
    padding: 14px 12px !important;
    line-height: 1.5;
  }

  /* 8. Canvas Responsivo */
  .op-canvas-wrap {
    margin-top: 12px;
    border-width: 2px;
    border-radius: 12px;
    touch-action: none;
    height: auto;
  }

  #op-canvas {
    width: 100% !important;
  }

  /* 9. Legendas Flutuantes */
  .mouse-coords {
    display: none !important; /* Oculta coordenadas no mobile (economiza espaço) */
  }

  .scale-legend {
    position: absolute !important;
    font-size: 10px !important;
    padding: 4px 10px !important;
    bottom: 10px !important;
    right: 10px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    z-index: 10 !important;
    pointer-events: none !important;
    font-weight: 500 !important;
  }

  /* 10. Footer Empilhado */
  .op-footer {
    padding: 30px 16px 15px;
    margin-top: 25px;
  }

  .op-footer-container {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding: 0 12px;
  }

  .op-footer-brand,
  .op-footer-contact,
  .op-footer-social {
    width: 100%;
  }

  .op-footer-logo {
    width: 60px;
    margin: 0 auto 8px;
  }

  .op-footer-title {
    font-size: 16px !important;
  }

  .op-footer-desc {
    font-size: 13px !important;
  }

  .op-footer-contact h4,
  .op-footer-social h4 {
    font-size: 14px !important;
  }

  .op-footer-contact p {
    font-size: 13px !important;
  }

  .op-social-links {
    display: flex !important;
    justify-content: center;
    gap: 16px;
  }

  .op-social-links a {
    font-size: 20px !important;
    margin: 0 !important;
  }

  .op-footer-bottom {
    font-size: 11px !important;
    margin-top: 20px;
    padding-top: 12px;
  }

  /* 11. Medida Label (dentro do canvas) */
  .measure-label {
    font-size: 12px !important;
    padding: 4px 8px !important;
  }
}

/* ========== TABLET (577px até 768px) ========== */
@media (min-width: 577px) and (max-width: 768px) {
  
  .op-wrapper {
    width: 96% !important;
    padding: 24px 18px !important;
    margin: 12px auto !important;
  }

  .op-title {
    font-size: 28px !important;
    margin-bottom: 22px !important;
  }

  .op-controls {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .op-tool-buttons {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
  }

  .op-tool-buttons .op-btn {
    padding: 12px 8px !important;
    font-size: 13px !important;
    min-height: 44px;
  }

  #op-calc,
  #op-export-pdf {
    width: 100% !important;
    padding: 13px 16px !important;
  }

  .scale-legend {
    position: absolute !important;
    font-size: 11px !important;
    padding: 5px 12px !important;
    bottom: 12px !important;
    right: 12px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    z-index: 10 !important;
    pointer-events: none !important;
  }

  .op-footer-container {
    flex-direction: row;
    text-align: left;
    gap: 30px;
    justify-content: flex-start;
  }

  .op-footer-brand {
    max-width: 200px;
  }
}

/* ========== DESKTOP (769px em diante) ========== */
@media (min-width: 769px) {
  
  .op-wrapper {
    width: 70%;
    padding: 36px;
    margin: 20px auto;
  }

  .op-controls {
    grid-template-columns: 1fr 1fr auto;
  }

  .op-footer-container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ========== LARGE DESKTOP (1200px+) ========== */
@media (min-width: 1200px) {
  
  .op-wrapper {
    max-width: 1320px;
  }

  .op-title {
    font-size: 40px;
  }

  .op-controls {
    gap: 20px;
  }
}


