/* =========================================================
 * TMCO checkout-universal.css — CSS CIRÚRGICO v3.0
 * 
 * Afeta APENAS os campos do checkout, não o layout do tema
 * Compatível com 100% dos temas
 * ========================================================= */

/* =========================================================
 * OCULTAR CAMPO PAÍS (billing_country)
 * ========================================================= */

#billing_country_field {
  display: none !important;
}

/* =========================================================
 * INPUTS DO CHECKOUT - Apenas texto visível
 * ========================================================= */

/* Força cor do texto APENAS nos campos do checkout */
.woocommerce-billing-fields input[type="text"],
.woocommerce-billing-fields input[type="email"],
.woocommerce-billing-fields input[type="tel"],
.woocommerce-billing-fields input[type="number"],
.woocommerce-billing-fields textarea,
.woocommerce-billing-fields select,
.woocommerce-shipping-fields input[type="text"],
.woocommerce-shipping-fields input[type="email"],
.woocommerce-shipping-fields input[type="tel"],
.woocommerce-shipping-fields textarea,
.woocommerce-shipping-fields select,
.woocommerce-additional-fields textarea {
  color: #000 !important;
}

/* Placeholders visíveis */
.woocommerce-billing-fields input::placeholder,
.woocommerce-billing-fields textarea::placeholder,
.woocommerce-shipping-fields input::placeholder,
.woocommerce-shipping-fields textarea::placeholder,
.woocommerce-additional-fields textarea::placeholder {
  color: #666 !important;
  opacity: 1 !important;
}

/* Labels sempre visíveis */
.woocommerce-billing-fields label,
.woocommerce-shipping-fields label,
.woocommerce-additional-fields label {
  color: #000 !important;
}

/* =========================================================
 * MENSAGENS INLINE DO PLUGIN
 * ========================================================= */

.tmco-inline-msg {
  display: block;
  padding: 10px 12px;
  margin-top: 8px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
}

.tmco-msg-ok .tmco-inline-msg {
  background-color: #d4edda;
  border-left: 3px solid #28a745;
  color: #155724;
}

.tmco-msg-warn .tmco-inline-msg {
  background-color: #fff3cd;
  border-left: 3px solid #ffc107;
  color: #856404;
}

.tmco-msg-error .tmco-inline-msg {
  background-color: #f8d7da;
  border-left: 3px solid #dc3545;
  color: #721c24;
}

/* Animação suave */
@keyframes tmcoFadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.tmco-inline-msg {
  animation: tmcoFadeIn 0.3s ease;
}

/* =========================================================
 * LOADING STATE - Durante AJAX
 * ========================================================= */

.woocommerce-checkout.processing {
  position: relative;
}

.woocommerce-checkout.processing::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  z-index: 9998;
}

.woocommerce-checkout.processing::after {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid #ddd;
  border-top-color: #0073aa;
  border-radius: 50%;
  z-index: 9999;
  animation: tmcoSpin 0.6s linear infinite;
}

@keyframes tmcoSpin {
  to { transform: rotate(360deg); }
}

/* =========================================================
 * BOTÃO DISABLED - Durante consultas AJAX
 * ========================================================= */

#place_order.tmco-disabled {
  opacity: 0.6;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* =========================================================
 * RESPONSIVO - Mobile
 * ========================================================= */

@media (max-width: 768px) {
  .tmco-inline-msg {
    font-size: 12px;
    padding: 8px 10px;
  }
}

/* =========================================================
 * MENSAGEM DE AUTO-ATUALIZAÇÃO
 * ========================================================= */

.tmco-auto-update-msg {
  margin: 0 0 20px 0 !important;
  padding: 12px 16px !important;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
  animation: tmco-slideDown 0.3s ease;
}

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

/* =========================================================
 * FIM - CSS Minimalista e Cirúrgico
 * Não afeta layout, tipografia ou cores do tema
 * Apenas garante visibilidade dos campos e funcionalidades do plugin
 * ========================================================= */
