/* ============================================================================
   TECH SOLUÇÕES - Custom Styles
   ============================================================================ */

:root {
  --primary: #0F2A5F;
  --secondary: #3A7BFF;
  --white: #FFFFFF;
  --gray: #F5F5F5;
  --text: #333333;
  --text-light: #666666;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
}

/* ============================================================================
   MODAL
   ============================================================================ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

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

/* ============================================================================
   TABS
   ============================================================================ */

.tabs {
  display: flex;
  border-bottom: 2px solid var(--gray);
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.3s;
}

.tab-btn:hover {
  color: var(--secondary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  animation: fadeIn 0.3s;
}

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

/* ============================================================================
   FORM FIELDS
   ============================================================================ */

.input-field {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E5E7EB;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s;
}

.input-field:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(58, 123, 255, 0.1);
}

.input-field:disabled {
  background: var(--gray);
  cursor: not-allowed;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(58, 123, 255, 0.3);
}

.btn-primary:disabled {
  background: #9CA3AF;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--gray);
  color: var(--text);
  padding: 12px 30px;
  border: 2px solid #E5E7EB;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  border-color: var(--secondary);
  color: var(--secondary);
}

.btn-danger {
  background: var(--danger);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-danger:hover {
  background: #DC2626;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
}

/* ============================================================================
   CARDS
   ============================================================================ */

.card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ============================================================================
   NOTIFICATIONS
   ============================================================================ */

.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  z-index: 10000;
  animation: slideInRight 0.3s ease-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notification-success {
  background: var(--success);
}

.notification-error {
  background: var(--danger);
}

.notification-info {
  background: var(--secondary);
}

.notification-warning {
  background: var(--warning);
}

/* ============================================================================
   BADGES
   ============================================================================ */

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-new {
  background: var(--success);
  color: white;
}

.badge-promo {
  background: var(--danger);
  color: white;
}

.badge-free-shipping {
  background: var(--secondary);
  color: white;
}

/* ============================================================================
   LOADING
   ============================================================================ */

.loading-spinner {
  border: 4px solid rgba(58, 123, 255, 0.2);
  border-top: 4px solid var(--secondary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

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

/* ============================================================================
   PAYMENT METHODS
   ============================================================================ */

.payment-method {
  transition: all 0.3s;
}

.payment-method:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.payment-method.selected {
  border-color: var(--primary) !important;
  background: rgba(58, 123, 255, 0.05);
}

/* ============================================================================
   ADMIN TABLE
   ============================================================================ */

table {
  border-collapse: collapse;
}

table thead tr {
  background: var(--gray);
}

table tbody tr:hover {
  background: rgba(58, 123, 255, 0.05);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
  .modal-content {
    padding: 20px;
    margin: 10px;
  }

  .tabs {
    flex-direction: column;
  }

  .tab-btn {
    border-bottom: 1px solid var(--gray);
  }

  .tab-btn.active {
    border-left: 3px solid var(--primary);
    border-bottom: 1px solid var(--gray);
  }

  .notification {
    left: 20px;
    right: 20px;
  }
}

/* ============================================================================
   UTILITIES
   ============================================================================ */

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.bg-primary { background: var(--primary); }
.bg-secondary { background: var(--secondary); }
.bg-success { background: var(--success); }
.bg-danger { background: var(--danger); }
.bg-warning { background: var(--warning); }

.border-primary { border-color: var(--primary) !important; }
.border-secondary { border-color: var(--secondary) !important; }

/* ============================================================================
   IMAGE PREVIEW
   ============================================================================ */

#imagePreview img {
  border: 2px solid var(--gray);
  transition: all 0.3s;
}

#imagePreview img:hover {
  border-color: var(--secondary);
  transform: scale(1.05);
}

/* ============================================================================
   QR CODE DISPLAY
   ============================================================================ */

.qr-code-container {
  background: white;
  padding: 20px;
  border-radius: 12px;
  display: inline-block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-code-container img {
  display: block;
  max-width: 300px;
  height: auto;
}

/* ============================================================================
   CHATBOT
   ============================================================================ */

#chatbotWidget {
  animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.chat-message {
  display: flex;
  align-items: flex-start;
  animation: fadeIn 0.3s ease-out;
}

.chat-message.user {
  justify-content: flex-end;
}

.chat-message.bot {
  justify-content: flex-start;
}

/* Chatbot Mobile Responsiveness */
@media (max-width: 768px) {
  #chatbotWidget {
    width: calc(100vw - 2rem);
    right: 1rem;
    bottom: 5rem;
    max-height: 500px;
  }
  
  #chatMessages {
    height: 300px;
  }
}
