/* ========================================
   Wrapper Principal
   ======================================== */
.uazapi-cpw-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}

/* ========================================
   Label
   ======================================== */
.uazapi-cpw-wrap label {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  color: #333;
  margin: 0;
}

/* ========================================
   Select Customizado
   ======================================== */
.uazapi-cpw-wrap select {
  width: 100%;
  padding: 4px 14px;
  font-size: 1rem;
  line-height: 1.4;
  color: #333;
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
  transition: all 0.2s ease;
  cursor: pointer;
  font-family: inherit;
}

.uazapi-cpw-wrap select:hover {
  border-color: #25d366;
  background-color: #fafafa;
}

.uazapi-cpw-wrap select:focus {
  border-color: #25d366;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.1);
}

.uazapi-cpw-wrap select:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
  border-color: #ddd;
}

/* ========================================
   Botão Principal
   ======================================== */
.uazapi-cpw-btn {
  width: 100%;
  padding: 10px 20px;
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  font-family: inherit;
}

.uazapi-cpw-btn:hover:not(:disabled) {
  background: #0B7231;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.uazapi-cpw-btn:active:not(:disabled) {
  transform: translateY(0);
}

.uazapi-cpw-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
}

.uazapi-cpw-btn:disabled,
.uazapi-cpw-btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========================================
   Ícone WhatsApp
   ======================================== */
.uazapi-cpw-btn .uazapi-cpw-whatsapp-icon {
  width: 20px;
  height: 20px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex-shrink: 0;
}

.uazapi-cpw-btn .uazapi-cpw-whatsapp-icon svg {
  width: 100%;
  height: 100%;
}

/* ========================================
   Feedback (Mensagens de Status)
   ======================================== */
.uazapi-cpw-feedback {
  min-height: 24px;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  margin-top: 4px;
  padding: 0;
  animation: slideIn 0.2s ease;
}

.uazapi-cpw-feedback:empty {
  display: none;
}

.uazapi-cpw-feedback .uazapi-cpw-spinner {
  margin-right: 8px;
  flex-shrink: 0;
}

.uazapi-cpw-feedback.success {
  color: #16a34a;
  font-weight: 500;
}

.uazapi-cpw-feedback.error {
  color: #dc2626;
  font-weight: 500;
}

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

/* ========================================
   Spinner de Carregamento
   ======================================== */
.uazapi-cpw-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(37, 211, 102, 0.2);
  border-top: 3px solid #25d366;
  border-radius: 50%;
  animation: uazapi-spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

/* ========================================
   Responsividade Mobile
   ======================================== */
@media (max-width: 480px) {
  .uazapi-cpw-wrap select {
    font-size: 16px;
  }
}
