/**
 * Platform Checkout Modal Styles
 */

/* Modal Base */
.pco-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

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

.pco-modal-container {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: pco-slide-up 0.3s ease-out;
}

@keyframes pco-slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pco-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 1;
}

.pco-modal-close:hover {
  background: #e5e7eb;
  color: #374151;
}

/* Step Content */
.pco-step {
  padding: 2rem;
}

.pco-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.pco-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.5rem;
}

.pco-header p {
  color: #6b7280;
  margin: 0;
}

.pco-header .pco-plan-info {
  display: inline-block;
  background: linear-gradient(135deg, #00a2e8, #0077b6);
  color: #fff !important;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Payment Methods */
.pco-payment-methods {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.pco-method-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #6b7280;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pco-method-btn:hover {
  border-color: #00a2e8;
  color: #00a2e8;
}

.pco-method-btn.active {
  border-color: #00a2e8;
  background: linear-gradient(135deg, rgba(0, 162, 232, 0.1), rgba(0, 119, 182, 0.1));
  color: #00a2e8;
}

.pco-method-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pco-method-btn svg {
  width: 20px;
  height: 20px;
}

/* Form */
.pco-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pco-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pco-field {
  margin-bottom: 1rem;
}

.pco-field:last-child {
  margin-bottom: 0;
}

.pco-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.375rem;
}

.pco-field input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 1rem;
  color: #111827;
  transition: all 0.2s;
  box-sizing: border-box;
}

.pco-field input:focus {
  outline: none;
  border-color: #00a2e8;
  box-shadow: 0 0 0 3px rgba(0, 162, 232, 0.15);
}

.pco-field input::placeholder {
  color: #9ca3af;
}

.pco-field-row {
  display: flex;
  gap: 1rem;
}

.pco-field-row .pco-field {
  flex: 1;
}

/* Error */
.pco-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
}

/* Submit Button */
.pco-submit-btn {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #00a2e8, #0077b6);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.pco-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 162, 232, 0.4);
}

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

.pco-btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Security Badge */
.pco-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  color: #6b7280;
  font-size: 0.75rem;
}

.pco-security svg {
  color: #10b981;
}

/* Spinner */
.pco-spinner {
  width: 20px;
  height: 20px;
  animation: pco-spin 1s linear infinite;
}

.pco-spinner-large {
  width: 48px;
  height: 48px;
}

@keyframes pco-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* PIX Step */
.pco-pix-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.pco-qrcode {
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
}

.pco-qrcode img {
  width: 200px;
  height: 200px;
  display: block;
}

.pco-pix-code {
  display: flex;
  width: 100%;
  gap: 0.5rem;
}

.pco-pix-code input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.75rem;
  color: #6b7280;
  background: #f9fafb;
}

.pco-copy-btn {
  padding: 0.75rem 1.25rem;
  background: #00a2e8;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.pco-copy-btn:hover {
  background: #0077b6;
}

.pco-pix-timer {
  color: #6b7280;
  font-size: 0.875rem;
}

.pco-pix-timer span {
  font-weight: 600;
  color: #00a2e8;
}

.pco-pix-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 12px;
  color: #6b7280;
}

.pco-status-icon svg {
  color: #00a2e8;
}

/* Processing Step */
.pco-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  text-align: center;
}

.pco-processing svg {
  color: #00a2e8;
  margin-bottom: 1.5rem;
}

.pco-processing h2 {
  font-size: 1.25rem;
  color: #111827;
  margin: 0 0 0.5rem;
}

.pco-processing p {
  color: #6b7280;
  margin: 0;
}

/* Success Step */
.pco-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  text-align: center;
}

.pco-success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.pco-success-icon svg {
  color: #fff;
}

.pco-success h2 {
  font-size: 1.5rem;
  color: #111827;
  margin: 0 0 0.5rem;
}

.pco-success p {
  color: #6b7280;
  margin: 0 0 1.5rem;
}

.pco-success-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, #00a2e8, #0077b6);
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.2s;
}

.pco-success-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 162, 232, 0.4);
}

/* Auth Choice Step */
.pco-auth-choice {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pco-auth-question {
  text-align: center;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.pco-auth-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.pco-auth-btn:hover {
  border-color: #00a2e8;
  background: linear-gradient(135deg, rgba(0, 162, 232, 0.05), rgba(0, 119, 182, 0.05));
}

.pco-auth-btn-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 12px;
  color: #6b7280;
  transition: all 0.2s;
}

.pco-auth-btn:hover .pco-auth-btn-icon {
  background: linear-gradient(135deg, #00a2e8, #0077b6);
  color: #fff;
}

.pco-auth-btn-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pco-auth-btn-title {
  font-weight: 600;
  color: #111827;
  font-size: 1rem;
}

.pco-auth-btn-desc {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Back Button */
.pco-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem;
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.2s;
}

.pco-back-btn:hover {
  color: #111827;
}

/* Registration Step */
#pco-register-form .pco-section {
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 480px) {
  .pco-step {
    padding: 1.5rem;
  }

  .pco-header h2 {
    font-size: 1.25rem;
  }

  .pco-payment-methods {
    flex-direction: column;
  }

  .pco-field-row {
    flex-direction: column;
    gap: 0;
  }

  .pco-qrcode img {
    width: 160px;
    height: 160px;
  }
}
