/* Estilos para formulários GetItens - Frontend */
.getitens-form-container {
  margin: 20px 0;
}

.getitens-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid #e1e5e9;
}

.getitens-form h3 {
  margin-top: 0;
  margin-bottom: 25px;
  color: #2c3e50;
  text-align: center;
  font-size: 28px;
  font-weight: 600;
}

.getitens-form-group {
  margin-bottom: 20px;
}

.getitens-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #34495e;
  font-size: 14px;
}

.getitens-form-group input,
.getitens-form-group select,
.getitens-form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-size: 16px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.getitens-form-group input:focus,
.getitens-form-group select:focus,
.getitens-form-group textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.getitens-form-group textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.getitens-form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.getitens-form-col {
  flex: 1;
}

.getitens-form-col-2 {
  flex: 2;
}

.getitens-form-col-3 {
  flex: 3;
}

.getitens-btn {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.getitens-btn:hover {
  background: linear-gradient(135deg, #2980b9, #1f5f8b);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.getitens-btn:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.getitens-loading {
  display: none;
  text-align: center;
  padding: 30px;
}

.getitens-loading.active {
  display: block;
}

.getitens-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: getitens-spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes getitens-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.getitens-message {
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 6px;
  display: none;
  font-weight: 500;
}

.getitens-message.success {
  background: #d5f4e6;
  color: #27ae60;
  border: 1px solid #27ae60;
}

.getitens-message.error {
  background: #fdeaea;
  color: #e74c3c;
  border: 1px solid #e74c3c;
}

.getitens-message.show {
  display: block;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Produtos */
.getitens-produtos-wrapper {
  margin: 30px 0;
}

.getitens-produtos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin: 20px 0;
}

.getitens-produto {
  background: #fff;
  border: 1px solid #e1e5e9;
  border-radius: 10px;
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.getitens-produto:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border-color: #3498db;
}

.getitens-produto img {
  max-width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.getitens-produto h4 {
  margin: 0 0 15px;
  color: #2c3e50;
  font-size: 20px;
  font-weight: 600;
}

.getitens-produto .price {
  font-size: 24px;
  font-weight: bold;
  color: #27ae60;
  margin-bottom: 15px;
}

.getitens-produto .description {
  color: #7f8c8d;
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.getitens-produto .btn-add-cart {
  background: linear-gradient(135deg, #27ae60, #229954);
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.getitens-produto .btn-add-cart:hover {
  background: linear-gradient(135deg, #229954, #1e8449);
  transform: translateY(-2px);
}

/* Validação de campos */
.getitens-form-group.error input,
.getitens-form-group.error select,
.getitens-form-group.error textarea {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.getitens-form-group .error-message {
  color: #e74c3c;
  font-size: 13px;
  margin-top: 8px;
  display: none;
  font-weight: 500;
}

.getitens-form-group.error .error-message {
  display: block;
}

/* Checkbox e Radio */
.getitens-checkbox,
.getitens-radio {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.getitens-checkbox input,
.getitens-radio input {
  width: auto;
  margin-right: 12px;
}

/* Select customizado */
.getitens-select-wrapper {
  position: relative;
}

.getitens-select-wrapper::after {
  content: "▼";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #7f8c8d;
  font-size: 12px;
}

.getitens-select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 45px;
}

/* Responsivo */
@media (max-width: 768px) {
  .getitens-form {
    margin: 10px;
    padding: 20px;
  }

  .getitens-form h3 {
    font-size: 24px;
  }

  .getitens-form-row {
    flex-direction: column;
    gap: 0;
  }

  .getitens-produtos {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .getitens-produtos {
    grid-template-columns: 1fr;
  }

  .getitens-form-group input,
  .getitens-form-group select,
  .getitens-form-group textarea {
    font-size: 16px; /* Evita zoom no iOS */
  }
}

/* Estados de loading para botões */
.getitens-btn.loading {
  position: relative;
  color: transparent;
}

.getitens-btn.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: getitens-spin 1s linear infinite;
}

/* Animações suaves */
.getitens-form-group {
  animation: fadeInUp 0.5s ease;
}

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

/* Melhorias de acessibilidade */
.getitens-form-group input:focus,
.getitens-form-group select:focus,
.getitens-form-group textarea:focus {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

/* Estados de sucesso */
.getitens-form-group.success input,
.getitens-form-group.success select,
.getitens-form-group.success textarea {
  border-color: #27ae60;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}
