/*  Correção de SVGs vazios no Payment Brick */
#cardPaymentBrick_container svg[width=""],
#cardPaymentBrick_container svg[height=""] {
  width: 24px !important;
  height: 24px !important;
}

#cardPaymentBrick_container svg {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
}

#pixQRCode {
  margin: 15px auto;
  width: 200px;
  height: 200px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  padding: 15px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  overflow: hidden;
  min-height: 500px;
}

.header {
  background: #004080;
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.user-name {
  font-weight: bold;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 11px;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logoff {
  background-color: #f44336;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.main-content {
  padding: 20px;
}

h1 {
  text-align: center;
  color: #004080;
  margin-bottom: 8px;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 20px;
  font-size: clamp(0.9rem, 3vw, 1rem);
}

.subscription-plan {
  border: 2px solid #004080;
  border-radius: 10px;
  padding: 20px;
  margin: 15px 0;
  text-align: center;
}

.plan-title {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: #004080;
  margin-bottom: 8px;
}

.plan-price {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: bold;
  color: #28a745;
  margin-bottom: 12px;
}

.plan-features {
  list-style: none;
  margin: 15px 0;
  text-align: left;
}

.plan-features li {
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  font-size: clamp(0.8rem, 2.5vw, 0.9rem);
}

.plan-features li:before {
  content: "?";
  color: #28a745;
  font-weight: bold;
  margin-right: 8px;
}

.btn-subscribe {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: clamp(14px, 3vw, 16px);
  font-weight: bold;
  width: 100%;
  margin-top: 15px;
  transition: background-color 0.3s;
}

.btn-subscribe:hover {
  background-color: #218838;
}

.btn-subscribe:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.payment-form {
  margin-top: 15px;
  display: none;
}

#cardPaymentBrick_container {
  margin: 15px 0;
  min-height: 150px;
}

.loading {
  text-align: center;
  padding: 15px;
  color: #666;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 8px;
  border-radius: 5px;
  margin: 8px 0;
  text-align: center;
  font-size: 14px;
}

.success-message {
  background: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 5px;
  margin: 15px 0;
  text-align: center;
}

.subscription-status {
  background: #e7f3ff;
  border-radius: 10px;
  padding: 15px;
  margin: 15px 0;
  text-align: center;
}

.status-active {
  color: #28a745;
  font-weight: bold;
  font-size: clamp(1rem, 3vw, 1.2rem);
}

.status-inactive {
  color: #dc3545;
  font-weight: bold;
  font-size: clamp(1rem, 3vw, 1.2rem);
}

.status-message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 5px;
  color: white;
  font-weight: bold;
  z-index: 1000;
  text-align: center;
  min-width: 280px;
  max-width: 90%;
  font-size: 14px;
}

.status-success {
  background: #4CAF50;
}

.status-error {
  background: #f44336;
}

.status-warning {
  background: #ff9800;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  display: none;
}

.loading-spinner {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  margin: 20px;
  max-width: 300px;
}

.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Responsividade para telas muito pequenas */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }
  
  .main-content {
    padding: 15px;
  }
  
  .subscription-plan {
    padding: 15px;
  }
  
  .header {
    padding: 12px 15px;
  }
  
  .btn-logoff {
    padding: 6px 10px;
    font-size: 11px;
  }
}

/* Responsividade para tablets */
@media (min-width: 768px) and (max-width: 1024px) {
  .container {
    max-width: 90%;
  }
}

/* Melhorias para desktop */
@media (min-width: 1025px) {
  .container {
    max-width: 800px;
  }
}