:root {
  --primary-color: #154c79;
  --secondary-color: #f5f7fa;
  --accent-color: #28a745;
  --text-color: #333;
  --text-light: #666;
  --border-radius: 12px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --font-main: 'Segoe UI', 'Arial', sans-serif;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--secondary-color);
  font-family: var(--font-main);
  color: var(--text-color);
}

/* Side Panel Styles */
#price-details-panel {
  position: fixed;
  top: 130px;
  right: -350px;
  width: 350px;
  height: calc(100% - 130px);
  background: white;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  transition: right 0.3s ease-in-out;
  z-index: 1001;
}

#price-details-panel:not(.hidden) {
  right: 0;
}

#price-details-panel {
  position: fixed;
  top: 130px;
  right: -350px;
  width: 350px;
  height: calc(100% - 130px);
  background: white;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  transition: right 0.3s ease-in-out;
  z-index: 1001;
}

#price-details-panel:not(.hidden) {
  right: 0;
}

.panel-header {
  position: relative;
  padding: 1rem;
  background: var(--primary-color);
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sucateiro-name {
  font-size: 1.5rem;
  margin: 0;
  font-weight: bold;
  display: inline-block;
  text-align: right;
  flex-grow: 1;
}

.contact-info p {
  margin: 0.5rem 0;
  padding: 0;
}

.contact-info p:first-child {
  font-weight: bold;
}

.close-btn {
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 24px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0;
  margin: 0;
  line-height: 1;
  z-index: 1;
  transition: transform 0.2s ease;
  width: 50px;
  height: 24px;
}

.close-btn:hover {
  transform: scale(1.1);
  color: #fff;
}

.close-btn:hover {
  background: rgba(255,255,255,0.1);
}

.panel-content {
  padding: 1rem;
  height: calc(100% - 50px);
  overflow-y: auto;
}

.sucateiro-info {
  margin-bottom: 1.5rem;
}

.contact-info {
  margin-top: 0.5rem;
}

.whatsapp-btn {
  display: inline-block;
  padding: 0;
  background: white;
  color: inherit;
  text-decoration: none;
}

.whatsapp-btn:hover {
  background: white;
}

#sucateiro-link {
  display: flex;
  align-items: center;
  gap: 5px;
}

#sucateiro-link img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1); /* Inverte para branco */
}

.prices-list {
  margin: 1rem 0;
}

#prices-list {
  list-style: none;
  padding: 0;
}

#prices-list li {
  padding: 0.75rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#prices-list li:last-child {
  border-bottom: none;
}

.price-value {
  font-weight: bold;
  color: var(--accent-color);
}

.container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

h1, h2, h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  text-align: center;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: var(--text-light);
}

input, select, textarea, button {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
  box-sizing: border-box;
}

button {
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
  border: none;
  transition: background-color 0.2s, transform 0.2s;
  cursor: pointer;
}

button:hover {
  background-color: #1a5ed1;
  transform: scale(1.03);
}

.home-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  background-color: #2b7a0b;
  color: white;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.home-btn:hover {
  background-color: #256304;
}

#message.success {
  color: green;
}

#message.error {
  color: red;
}

ul#precos-list {
  list-style: none;
  padding-left: 0;
}

ul#precos-list li {
  background: #e9ecef;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

#map {
  height: 550px;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 1rem;
}

.preco-box {
  background-color: #154c79;
  color: white;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  border: 2px solid #154c79;
  white-space: nowrap;
  text-align: center;
  line-height: 1.2;
  transition: transform 0.2s, box-shadow 0.2s;
}

.preco-icon:hover .preco-box {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* Ajustes para a responsividade do cabe�alho */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: white;
  box-shadow: var(--box-shadow);
  display: flex;
  align-items: center; /* verticalmente centralizado */
  justify-content: space-between; /* distribui esquerda/direita */
  z-index: 1000;
  padding: 0 3rem; 
}

.header .logo {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header .logo-img {
  height: 40px;
  width: auto;
  display: block; /* remove espa�os inline */
  margin: 0;
  padding: 0;
  margin-left: 0.5rem;
}

.logo-img {
  height: 140px;
  width: auto;
  max-width: 100%;
  vertical-align: botton;
  align-items: center;
}

.header .user-link {
      margin-right: 0rem;
}

.header .user-link a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    background-color: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: background-color 0.2s;
    display: inline-block;
}

    .header .user-link a:hover {
      background-color: #e0e0e0;
    }

.header .material-filter {
  flex-grow: 1;
  display: flex;
  justify-content: center;
}

.header .material-filter select {
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
  width: 100%;
  max-width: 400px;
}

.header .user-link {
  margin-right: 0rem;
}

.header .user-link a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
  background-color: var(--secondary-color);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: background-color 0.2s;
  display: inline-block;
}

.header .user-link a:hover {
  background-color: #e0e0e0;
}

.logo-container .logo {
  height: 100px; /* ou ajuste para o tamanho ideal */
  width: auto;
}


/* Responsividade do cabe�alho */
@media (max-width: 768px) {
  .header {
    padding: 0 1rem;  /* Ajusta o padding para telas menores */
    height: 60px;  /* Reduz a altura do cabe�alho para dispositivos m�veis */
  }

  .header .logo {
    font-size: 1.3rem;
  }

  .header .material-filter select {
    font-size: 0.9rem;
  }

  .header .user-link a {
    font-size: 0.9rem;
    padding: 0rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0 0.5rem; /* Ajusta ainda mais o padding para telas muito pequenas */
    height: 50px;  /* Ajusta a altura do cabe�alho */
  }

  .header .logo {
    font-size: 1rem;  /* Tamanho da logo ainda menor */
  }

  .header .material-filter select {
    font-size: 0.8rem;
  }

  .header .user-link a {
    font-size: 0.8rem;
    padding: 0rem 0.6rem;
  }
}

#map {
  height: calc(100% - 70px);
  z-index: 1;
}

@media (max-width: 768px) {
  #map {
    height: calc(100% - 60px); /* Ajusta a altura do mapa conforme o novo cabe�alho */
  }
}

@media (max-width: 480px) {
  #map {
    height: calc(100% - 50px); /* Ajusta a altura do mapa para telas muito pequenas */
  }
}

.register-container {
  max-width: 400px;
  margin: 100px auto 2rem;
  padding: 2rem;
  background-color: #fff;
  box-shadow: var(--box-shadow);
  border-radius: var(--border-radius);
  text-align: center;
  font-family: var(--font-main);
}

.logo-img {
  width: 140px;
  margin-bottom: 1.5rem;
}

.subtitle {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin: 1rem 0;
  text-align: center;
}

.social-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem 0;
}

.social-icon {
  width: 40px; /* Ajuste para o tamanho desejado */
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  object-fit: cover;
  box-shadow: var(--box-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.social-icon:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}


.divider {
  text-align: center;
  margin: 1rem 0;
  color: var(--text-light);
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: #ccc;
  position: absolute;
  top: 50%;
  width: 40%;
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

.map-label {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.login-text {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.login-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

.login-link:hover {
  text-decoration: underline;
}

/* Reset b�sico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f9f9f9;
  color: #333;
  padding: 2rem;
}

.container {
  max-width: 600px;
  margin: auto;
  background-color: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #2c3e50;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

fieldset {
  border: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

legend {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #2c3e50;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

input[type="text"],
input[type="tel"],
input[type="number"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

input:focus {
  border-color: #154c79;
  outline: none;
}

.inline-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.inline-input input[type="text"] {
  flex: 1;
}

.inline-input label {
  margin: 0;
  font-weight: normal;
  font-size: 0.95rem;
}

small {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.85rem;
}

small a {
  color: #154c79;
  text-decoration: none;
}

small a:hover {
  text-decoration: underline;
}

button[type="submit"] {
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 600;
  background-color: #154c79;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

button[type="submit"]:hover {
  background-color: #0056b3;
}

button,
input[type="email"],
input[type="password"] {
  display: block;
  width: 100%;
  padding: 0.75rem;
  margin: 0.5rem 0; /* controla o espa�o vertical entre os elementos */
  box-sizing: border-box;
}

#message {
  margin-top: 1rem;
  font-size: 1rem;
  text-align: center;
  color: green;
}


.overlay-message {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
background-color: #4CAF50;
color: white;
padding: 1rem 2rem;
border-radius: 10px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
z-index: 9999;
opacity: 0;
transition: opacity 0.5s ease;
font-size: 1rem;
}

.overlay-message.show {
opacity: 1;
}


@media (max-width: 600px) {
  .container {
    padding: 0.5rem;
  }

  h1 {
    font-size: 1.5rem;
  }
}
/* Bot�o "Usar endere�o preenchido" */
.btn-endereco {
  background-color: #f0f0f0;
  color: #333;
  border: 2px solid #999;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-endereco:hover {
  background-color: #e0e0e0;
}

/* Bot�o "Salvar Altera��es" */
.btn-submit {
  background-color: #007b5e;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-submit:hover {
  background-color: #005a43;
}

/* PLANS PAGE STYLES */
body.plans-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
  background-color: var(--secondary-color);
}

.logo {
  width: 140px;
  margin-bottom: 1rem;
}

.plans {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.plan-card {
  flex: 1 1 260px;
  background-color: #f9f9f9;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, border 0.3s ease;
  cursor: pointer;
  border: 3px solid transparent;
  text-align: left;
    display: flex;
  flex-direction: column;
  align-items: flex-start; /* Alinha conte�do � esquerda */
  justify-content: space-between;
  height: 100%; /* Garante preenchimento completo */
  position: relative;
}

.plan-card:hover {
  transform: translateY(-5px);
}

.plan-card.selected {
  border-color: #00796b;
  background-color: #e0f2f1;
  display: inline-block;
}

.plan-title {
  font-size: 1.4rem;
  color: #00796b;
  margin-bottom: 0.5rem;
}

.plan-price {
  font-size: 1.8rem;
  color: #004d40;
  font-weight: bold;
  margin-bottom: 1rem;
}

.plan-desc {
  font-size: 1rem;
  color: #555;
}

.subscribe-button {
  display: none;
  background-color: #00796b;
  color: white;
  padding: 0.4rem 1rem; /* Menor */
  border: none;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 1rem;
}

.subscribe-button:hover {
  background-color: #004d40;
}

@media (max-width: 600px) {
  h1 {
    font-size: 1.5rem;
  }

  .plans {
    flex-direction: column;
    gap: 1rem;
  }

  .subscribe-button {
    right: 1rem;
    bottom: 1rem;
  }
}

#success-overlay {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #4caf50; /* verde agradável */
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#success-overlay.show {
  display: block;
  opacity: 1;
}

#previewImage {
  width: 150px;
  height: 150px;
  object-fit: cover;
  display: none;
  margin-top: 10px;
  border-radius: 8px;
}

.sucateiro-cta {
  position: fixed;
  top: 16px;
  right: 24px;
  background: #fff;
  color: var(--primary-color);
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  z-index: 1001;
  box-shadow: 0 2px 8px rgba(21, 76, 121, 0.08);
  border: 1.5px solid var(--primary-color);
  outline: none;
  display: none;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border 0.18s, box-shadow 0.18s;
  display: flex;
  align-items: center;
  gap: 0;
}

@media (max-width: 600px) {
  .sucateiro-cta {
    top: 10px;
    right: 8px;
    padding: 7px 13px;
    font-size: 13px;
    border-radius: 15px;
  }
}

body.index-loaded #sucateiro-cta {
  display: flex;
}

.sucateiro-cta:hover, .sucateiro-cta:focus {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 16px rgba(21, 76, 121, 0.18);
}

body.index-loaded #sucateiro-cta {
  display: block;
}

.sucateiro-cta:hover {
  background-color: #1565c0;
}
