/* ========================================================================== 
   SUMA Remote AI Bridge - Product-specific page styles
   ========================================================================== */

.ai-page {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-glow: rgba(14, 165, 233, 0.13);
  --secondary: #10b981;
  --secondary-hover: #059669;
  --secondary-glow: rgba(16, 185, 129, 0.12);
  --shadow-primary: 0 10px 24px -4px rgba(2, 132, 199, 0.32);
  --product-single-download-max: 560px;
  --product-recommended-border: 2px solid var(--primary);
  --product-recommended-tag-bg: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  --product-primary-action-bg: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  --product-primary-action-shadow: 0 12px 26px rgba(2, 132, 199, 0.24);
  --product-primary-action-hover-shadow: 0 14px 30px rgba(2, 132, 199, 0.34);
  --product-license-hover-border: rgba(2, 132, 199, 0.34);
}

.ai-page .bg-glow-1 {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.16) 0%, rgba(255, 255, 255, 0) 70%);
}

.ai-page .bg-glow-2 {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
}

.ai-page .bg-glow-3 {
  background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
}

.ai-page .hero-product-logo {
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 18px 22px rgba(2, 132, 199, 0.2));
}

.ai-page .feature-card:hover {
  border-color: rgba(2, 132, 199, 0.3);
}

.ai-page .download-card-disabled .recommended-tag {
  display: inline-block;
  background: var(--slate-500);
}

.ai-page .btn-primary,
.ai-page .preview-btn,
.ai-page .lang-btn,
.ai-page .menu-toggle,
.ai-page .btn-dl,
.ai-page .btn-report,
.ai-page .product-sponsor-button {
  min-height: 44px;
}

.ai-page .btn-primary:focus-visible,
.ai-page .preview-btn:focus-visible,
.ai-page .lang-btn:focus-visible,
.ai-page .menu-toggle:focus-visible,
.ai-page .btn-dl:focus-visible,
.ai-page .btn-report:focus-visible,
.ai-page .product-sponsor-button:focus-visible {
  outline: 3px solid rgba(16, 185, 129, 0.5);
  outline-offset: 4px;
}

/* ==========================================================================
   Topology Diagram Section
   ========================================================================== */
.topology-section {
  padding: 80px 0 60px;
}

.topology-wrapper {
  max-width: 1080px;
  margin: 0 auto;
}

.topology-figure {
  margin: 0;
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: #07111f;
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.topology-figure:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 70px -12px rgba(2, 132, 199, 0.35);
  border-color: rgba(56, 189, 248, 0.45);
}

.topology-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
  object-fit: cover;
}

.ai-showcase {
  max-width: 980px;
  margin: 48px auto 0;
  perspective: 1100px;
}

.ai-showcase.is-switching .ai-window {
  opacity: 0.76;
  transform: rotateX(1deg) translateY(4px);
}

.ai-window {
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: var(--radius-lg);
  background: #07111f;
  box-shadow: 0 34px 80px -28px rgba(2, 8, 23, 0.58);
  transform: rotateX(1deg);
  transition: opacity 180ms ease, transform 180ms ease;
}

.ai-titlebar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  background: rgba(15, 32, 54, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.ai-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #d9f4ff;
  font-size: 0.82rem;
  font-weight: 700;
}

.ai-title img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.ai-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-controls {
  align-self: stretch;
  display: flex;
  margin-right: -16px;
}

.window-control {
  position: relative;
  width: 46px;
  min-height: 44px;
  color: rgba(226, 232, 240, 0.88);
}

.window-control::before,
.window-control::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.window-minimize::before {
  width: 10px;
  height: 1px;
  background: currentColor;
}

.window-maximize::before {
  width: 9px;
  height: 9px;
  border: 1px solid currentColor;
}

.window-close::before,
.window-close::after {
  width: 12px;
  height: 1px;
  background: currentColor;
}

.window-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.window-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.ai-app-body {
  min-height: 470px;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  background:
    radial-gradient(circle at 84% 8%, rgba(14, 165, 233, 0.18), transparent 18rem),
    radial-gradient(circle at 15% 95%, rgba(16, 185, 129, 0.12), transparent 20rem),
    #07111f;
}

.ai-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 24px 14px;
  border-right: 1px solid rgba(148, 163, 184, 0.13);
  background: rgba(8, 21, 38, 0.8);
}

.sidebar-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  background: rgba(14, 165, 233, 0.09);
}

.sidebar-mark img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.sidebar-dot {
  width: 36px;
  height: 7px;
  border-radius: var(--radius-full);
  background: rgba(148, 163, 184, 0.22);
}

.sidebar-dot.active {
  background: linear-gradient(90deg, #38bdf8, #0284c7);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.36);
}

.ai-workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 5vw, 54px);
}

.ai-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.mode-kicker {
  display: block;
  margin-bottom: 6px;
  color: #7dd3fc;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ai-panel-heading h3 {
  margin: 0;
  color: #f0f9ff;
  font-size: clamp(1.45rem, 3vw, 2.05rem);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-full);
  background: rgba(14, 165, 233, 0.12);
  color: #7dd3fc;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  content: "";
  box-shadow: 0 0 10px #38bdf8;
}

.ai-panel-desc {
  max-width: 580px;
  margin: 14px 0 28px;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
}

.connection-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.6);
}

.field-row span {
  color: #64748b;
  font-size: 0.84rem;
}

.field-row strong {
  color: #e2e8f0;
  font-family: var(--font-mono, monospace);
  font-size: 0.9rem;
}

.preview-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.preview-primary,
.preview-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: default;
}

.preview-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.preview-secondary {
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.6);
  color: #cbd5e1;
}

.preview-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.preview-btn {
  padding: 8px 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 180ms ease;
}

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

.preview-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

/* ==========================================================================
   Security & Connection Management Section (Aligned with RDP Bridge)
   ========================================================================== */
.security-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 52px;
  align-items: center;
}

.feature-security {
  margin-top: 64px;
  padding-top: 64px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.security h2 {
  margin: 18px 0 0;
  font-size: 2.25rem;
}

.security p {
  margin: 14px 0 0;
  color: var(--slate-600);
}

.security-badge {
  background: var(--secondary-glow);
  color: var(--secondary-hover);
}

.security-list {
  display: grid;
  gap: 16px;
}

.security-item {
  padding: 22px 24px;
  border: var(--border-light);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
}

.security-item strong {
  color: var(--slate-900);
  font-family: var(--font-title);
  font-size: 1.05rem;
}

.security-item p {
  margin-top: 7px;
  color: var(--slate-500);
  font-size: 0.95rem;
}

/* ==========================================================================
   FAQ Accordion Section (Aligned with RDP Bridge)
   ========================================================================== */
.ai-page .faq {
  padding: 80px 0;
}

.ai-page .faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-page .faq-item {
  overflow: hidden;
  border: var(--border-light);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal), background var(--transition-normal);
}

.ai-page .faq-item:hover {
  border-color: rgba(2, 132, 199, 0.25);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
}

.ai-page .faq-item.active {
  border-color: rgba(2, 132, 199, 0.35);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.ai-page .faq-toggle {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.ai-page .faq-toggle:focus-visible {
  outline: 3px solid rgba(16, 185, 129, 0.5);
  outline-offset: -4px;
}

.ai-page .faq-question {
  color: var(--slate-800);
  font-family: var(--font-title);
  font-size: 1.05rem;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.ai-page .faq-toggle:hover .faq-question,
.ai-page .faq-item.active .faq-question {
  color: var(--primary);
}

.ai-page .faq-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.ai-page .faq-icon::before,
.ai-page .faq-icon::after {
  content: '';
  position: absolute;
  border-radius: 1px;
  background: var(--primary);
  transition: transform 250ms ease-out, opacity 250ms ease-out;
}

.ai-page .faq-icon::before {
  top: 6px;
  left: 0;
  width: 14px;
  height: 2px;
}

.ai-page .faq-icon::after {
  top: 0;
  left: 6px;
  width: 2px;
  height: 14px;
}

.ai-page .faq-item.active .faq-icon::before {
  transform: rotate(180deg);
}

.ai-page .faq-item.active .faq-icon::after {
  opacity: 0;
  transform: rotate(90deg);
}

.ai-page .faq-answer {
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: max-height 300ms cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 300ms;
}

.ai-page .faq-item.active .faq-answer {
  max-height: 500px;
  visibility: visible;
  transition-delay: 0s;
}

.ai-page .faq-answer-content {
  min-height: 0;
  padding: 0 24px 20px 54px;
  color: var(--slate-600);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Responsive & Layout Rules */
@media (max-width: 900px) {
  .ai-window,
  .ai-showcase.is-switching .ai-window {
    transform: none;
  }

  .security-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ai-app-body {
    grid-template-columns: 1fr;
  }
  .ai-sidebar {
    display: none;
  }
  .feature-security {
    margin-top: 48px;
    padding-top: 48px;
  }
}

@media (max-width: 480px) {
  .security h2 {
    font-size: 1.85rem;
  }

  .ai-page .faq-toggle {
    gap: 12px;
    padding: 16px 20px;
  }

  .ai-page .faq-answer-content {
    padding: 0 20px 16px 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-window,
  .ai-showcase.is-switching .ai-window,
  .ai-page .faq-item,
  .ai-page .faq-question,
  .ai-page .faq-icon::before,
  .ai-page .faq-icon::after,
  .ai-page .faq-answer {
    transition: none;
  }
}

/* ==========================================================================
   Whitelist Restricted View (Access Control)
   ========================================================================== */
.whitelist-restricted-main {
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0 60px;
}

.whitelist-restricted-card {
  max-width: 580px;
  margin: 0 auto;
  padding: 48px 36px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px -12px rgba(2, 8, 23, 0.6);
  text-align: center;
  color: #f1f5f9;
}

.whitelist-restricted-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.whitelist-restricted-icon svg {
  width: 36px;
  height: 36px;
}

.whitelist-restricted-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  margin-bottom: 20px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.whitelist-restricted-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 10px #fbbf24;
}

.whitelist-restricted-card h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 700;
  margin: 0 0 14px;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.ai-page .tutorial {
  padding: 80px 0;
}

.ai-page .tutorial-article-note {
  margin-top: 28px;
  text-align: center;
  color: var(--slate-600);
  line-height: 1.6;
}

.ai-page .tutorial-article-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
  color: var(--primary);
  font-size: 1.08em;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease;
}

.ai-page .tutorial-article-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.ai-page .tutorial-article-link:focus-visible {
  outline: 3px solid rgba(2, 132, 199, 0.5);
  outline-offset: 4px;
  border-radius: 3px;
}

.ai-page .tutorial-article-link .link-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  fill: currentColor;
}

.whitelist-restricted-card p {
  color: #94a3b8;
  font-size: 1.02rem;
  line-height: 1.7;
  margin: 0 0 32px;
}

.whitelist-restricted-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.whitelist-restricted-actions .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 24px -4px rgba(2, 132, 199, 0.4);
  transition: all 180ms ease;
}

.whitelist-restricted-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -4px rgba(2, 132, 199, 0.5);
}

.whitelist-restricted-actions .btn-primary svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
