/* ITAM Guide Modal Styles */
:root {
  --guide-modal-width: 1060px;
  --guide-modal-height: 92vh;
  --guide-primary: #1E5149;
  --guide-accent: #6cc020;
}

/* Floating Trigger Button - REMOVED (now in header) */
.guide-trigger {
  display: none;
}

/* Modal Overlay */
.guide-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Guide Modal */
.guide-modal {
  width: var(--guide-modal-width);
  max-width: 94vw;
  height: var(--guide-modal-height);
  background-color: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.97);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Header */
.guide-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--guide-primary), #2a6d63);
  color: white;
  flex-shrink: 0;
}

.guide-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.btn-close-guide {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: white;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.btn-close-guide:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ===== Tab Navigation ===== */
.guide-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: #f8faf9;
  padding: 0 1.5rem;
  flex-shrink: 0;
  gap: 2px;
  overflow-x: auto;
}

.guide-tab {
  padding: 0.7rem 1rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
  top: 1px;
}

.guide-tab:hover {
  color: var(--guide-primary);
  background: rgba(30, 81, 73, 0.04);
}

.guide-tab.active {
  color: var(--guide-primary);
  border-bottom-color: var(--guide-primary);
  background: white;
}

/* ===== Content Area ===== */
.guide-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.guide-body::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.guide-tab-panel {
  display: none;
  padding: 1.5rem 2rem 2rem;
  animation: guideFadeIn 0.3s ease;
}

.guide-tab-panel.active {
  display: block;
}

@keyframes guideFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Section Styles ===== */
.guide-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.guide-section:last-child {
  margin-bottom: 0;
}

.guide-section h3 {
  font-size: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--guide-primary);
  color: var(--guide-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-section h4 {
  font-size: 0.9rem;
  color: var(--text-main);
  margin: 0.6rem 0 0.2rem;
  font-weight: 700;
}

.guide-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.guide-text strong {
  color: var(--text-main);
}

/* ===== Flowchart ===== */
.flow-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem;
  background-color: #f8faf9;
  border-radius: 12px;
  border: 1px dashed #d0d7d5;
}

.flow-row {
  display: flex;
  width: 100%;
  gap: 0.75rem;
  align-items: stretch;
}

.flow-step {
  flex: 1;
  background: white;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.flow-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  border-color: var(--guide-primary);
}

.flow-step .step-number {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background-color: var(--guide-primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.flow-step .step-label {
  font-weight: 700;
  color: var(--text-main);
  font-size: 13px;
  display: block;
}

.flow-step .step-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 2px;
}

.flow-arrow {
  color: #b5c4c0;
  width: 16px !important;
  height: 16px !important;
}

.flow-arrow-right {
  color: #b5c4c0;
  width: 16px !important;
  height: 16px !important;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ===== Info Table ===== */
.guide-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-top: 0.5rem;
}

.guide-info-table th {
  background: #f0f4f3;
  color: var(--guide-primary);
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 2px solid var(--guide-primary);
}

.guide-info-table td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  line-height: 1.5;
}

.guide-info-table tr:hover td {
  background: #f8faf9;
}

/* ===== Tip Box ===== */
.guide-tip {
  background: linear-gradient(135deg, #f0f9eb, #e8f5e0);
  border-left: 4px solid var(--guide-accent);
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 1rem;
  font-size: 12.5px;
  color: #2d5016;
  line-height: 1.6;
}

.guide-tip strong {
  color: #1a3a0a;
}

/* ===== Warning Box ===== */
.guide-warn {
  background: linear-gradient(135deg, #fff8ed, #fff3e0);
  border-left: 4px solid #ff9800;
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 1rem;
  font-size: 12.5px;
  color: #7a4a00;
  line-height: 1.6;
}

/* ===== Badge ===== */
.guide-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.guide-badge.green { background: #e6f4ea; color: #137333; }
.guide-badge.orange { background: #fff4e5; color: #b45309; }
.guide-badge.blue { background: #e8f0fe; color: #1a56db; }
.guide-badge.red { background: #fce8e6; color: #c5221f; }
