/* === Tính Lương 2026 - Custom Styles === */

:root {
  --primary: #1a56db;
  --primary-light: #3b82f6;
  --primary-dark: #1e40af;
  --accent: #10b981;
  --accent-light: #34d399;
}

/* === Base === */
body {
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Be Vietnam Pro', sans-serif;
}

/* === Number/Money Display === */
.font-mono, .money-display {
  font-family: 'JetBrains Mono', monospace;
}

/* === Mode Toggle Buttons === */
.mode-btn {
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.mode-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(26, 86, 219, 0.3);
}

.mode-btn.inactive {
  background: #e2e8f0;
  color: #334155;
}

.dark .mode-btn.inactive {
  background: #374151;
  color: #9ca3af;
}

.dark .mode-btn.active {
  background: var(--primary-light);
}

/* === Salary Input === */
.salary-input {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.salary-input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  outline: none;
}

.dark .salary-input:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* === Stepper Buttons === */
.stepper-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.stepper-btn:hover {
  transform: scale(1.1);
}

.stepper-btn:active {
  transform: scale(0.95);
}

/* === Result Card === */
.result-card {
  background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 100%);
  border: 1px solid #a7f3d0;
}

.dark .result-card {
  background: linear-gradient(135deg, #064e3b33 0%, #1e3a5f33 100%);
  border-color: #065f46;
}

.result-main-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.dark .result-main-value {
  color: var(--accent-light);
}

/* === Action Buttons === */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-btn:active {
  transform: translateY(0);
}

/* === Accordion === */
.accordion-icon {
  transition: transform 0.3s ease;
}

/* === Sidebar Sticky (Desktop) === */
@media (min-width: 1024px) {
  .ad-sidebar {
    position: sticky;
    top: 24px;
  }
}

/* === Ad Placeholder === */
.ad-placeholder {
  background: #f8fafc;
  border: 2px dashed #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.75rem;
  border-radius: 8px;
}

.dark .ad-placeholder {
  background: #1f2937;
  border-color: #374151;
  color: #6b7280;
}

/* === Smooth Scroll === */
html {
  scroll-behavior: smooth;
}

/* === Selection Color === */
::selection {
  background: rgba(59, 130, 246, 0.2);
}

/* === Print Styles === */
@media print {
  .ad-placeholder,
  .ad-sidebar,
  .ad-mobile,
  header nav,
  footer,
  .action-btn,
  #darkModeToggle {
    display: none !important;
  }

  .result-card {
    border: 1px solid #000;
    background: white !important;
  }
}

/* === Animations === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease-out;
}

/* === Light Mode Contrast Improvements === */
html:not(.dark) .text-gray-600,
html:not(.dark) .text-slate-500 {
  color: #374151;
}

html:not(.dark) .text-gray-500 {
  color: #4b5563;
}

html:not(.dark) .text-gray-400 {
  color: #6b7280;
}

html:not(.dark) .border-gray-200 {
  border-color: #d1d5db;
}

html:not(.dark) .bg-gray-50 {
  background-color: #f3f4f6;
}

/* === Info Button === */
.info-btn {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  background: #e2e8f0;
  color: #475569;
  border: 1px solid #cbd5e1;
  line-height: 1;
  flex-shrink: 0;
}

.info-btn:hover {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
  transform: scale(1.1);
}

.dark .info-btn {
  background: #374151;
  color: #9ca3af;
  border-color: #4b5563;
}

.dark .info-btn:hover {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

/* === Modal/Popup === */
.info-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.info-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.info-modal {
  background: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.2s ease;
}

.info-modal-overlay.active .info-modal {
  transform: scale(1) translateY(0);
}

.dark .info-modal {
  background: #1f2937;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.info-modal h3 {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #1e293b;
}

.dark .info-modal h3 {
  color: #f1f5f9;
}

.info-modal p,
.info-modal li {
  font-size: 0.875rem;
  line-height: 1.7;
  color: #4b5563;
}

.dark .info-modal p,
.dark .info-modal li {
  color: #9ca3af;
}

.info-modal ul {
  list-style: disc;
  padding-left: 20px;
  margin: 8px 0;
}

.info-modal .info-highlight {
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  margin: 12px 0;
}

.dark .info-modal .info-highlight {
  background: #1e3a5f33;
  border-left-color: #60a5fa;
}

.info-modal .close-btn {
  display: block;
  margin: 16px auto 0;
  padding: 8px 24px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.info-modal .close-btn:hover {
  background: #2563eb;
}

/* === Custom scrollbar === */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.dark ::-webkit-scrollbar-thumb {
  background: #4b5563;
}
