/**
 * Celebrex Commercial Checkout Styles
 * Isolado com prefixo celebrex-checkout- para evitar conflitos
 */

/* Modal Container */
.celebrex-checkout-modal {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.celebrex-checkout-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.celebrex-checkout-container {
  position: relative;
  z-index: 10001;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(11, 37, 100, 0.2);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.celebrex-checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #0b2564, #0052cc);
  color: #ffffff;
  box-sizing: border-box;
}

.celebrex-checkout-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
}

.celebrex-checkout-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.celebrex-checkout-close:hover {
  opacity: 0.8;
}

.celebrex-checkout-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  box-sizing: border-box;
}

/* Plan Summary */
.celebrex-plan-summary {
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  border-left: 4px solid #0052cc;
  box-sizing: border-box;
}

.celebrex-plan-summary h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: #0b2564;
}

.celebrex-plan-price {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  color: #0052cc;
}

/* Form Styles */
.celebrex-checkout-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.celebrex-checkout-form-group {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.celebrex-checkout-form-group label {
  font-weight: 600;
  margin-bottom: 6px;
  color: #1e293b;
  font-size: 0.95rem;
}

.celebrex-checkout-form-group input,
.celebrex-checkout-form-group select,
.celebrex-checkout-form-group textarea {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.celebrex-checkout-form-group input:focus,
.celebrex-checkout-form-group select:focus,
.celebrex-checkout-form-group textarea:focus {
  outline: none;
  border-color: #0052cc;
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.celebrex-checkout-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.celebrex-checkout-form-group.celebrex-checkout-checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}

.celebrex-checkout-form-group.celebrex-checkout-checkbox input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.celebrex-checkout-form-group.celebrex-checkout-checkbox label {
  margin: 0;
  font-weight: 500;
  font-size: 0.9rem;
  color: #64748b;
  cursor: pointer;
}

.celebrex-checkout-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.celebrex-checkout-error-message {
  color: #ff3366;
  font-size: 0.85rem;
  margin-top: 4px;
  display: block;
  min-height: 18px;
}

/* Buttons */
.celebrex-checkout-btn-submit {
  background: linear-gradient(135deg, #0052cc, #0b2564);
  color: #ffffff;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.25s ease;
  margin-top: 8px;
  box-sizing: border-box;
}

.celebrex-checkout-btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 82, 204, 0.3);
}

.celebrex-checkout-btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Loading State */
.celebrex-checkout-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  box-sizing: border-box;
}

.celebrex-checkout-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e2e8f0;
  border-top-color: #0052cc;
  border-radius: 50%;
  animation: celebrex-checkout-spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes celebrex-checkout-spin {
  to {
    transform: rotate(360deg);
  }
}

.celebrex-checkout-loading-state p {
  color: #64748b;
  font-size: 0.95rem;
}

/* Checkout Steps */
.celebrex-checkout-step {
  animation: celebrex-checkout-fadeIn 0.3s ease;
}

@keyframes celebrex-checkout-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .celebrex-checkout-container {
    width: 95%;
    max-height: 95vh;
    border-radius: 16px;
  }

  .celebrex-checkout-header {
    padding: 16px;
  }

  .celebrex-checkout-header h2 {
    font-size: 1.3rem;
  }

  .celebrex-checkout-content {
    padding: 16px;
  }

  .celebrex-checkout-form-row {
    grid-template-columns: 1fr;
  }

  .celebrex-checkout-close {
    width: 28px;
    height: 28px;
    font-size: 24px;
  }
}

/* Botões de contratação nos cards de planos */
.btn-plan[data-checkout-plan] {
  cursor: pointer;
}

.btn-plan[data-checkout-plan]:hover {
  opacity: 0.95;
}
