/* Privacy Dialog styles */
.privacy-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.privacy-dialog {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-heavy);
  max-width: 90vw;
  max-height: 90vh;
  width: 800px;
  padding: 0;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.privacy-dialog-overlay.active .privacy-dialog {
  transform: scale(1) translateY(0);
}

.privacy-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.privacy-dialog h2 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.privacy-dialog-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.privacy-dialog-close:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.privacy-dialog-content {
  padding: 1.5rem 2rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.privacy-dialog p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.privacy-dialog-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding: 1rem 2rem 2rem;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.privacy-dialog .btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.privacy-dialog .btn-primary {
  background: var(--accent-color);
  color: white;
}

.privacy-dialog .btn-primary:hover {
  background: color-mix(in srgb, var(--accent-color) 90%, black);
}

.privacy-dialog .btn-outline {
  background: transparent;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
}

.privacy-dialog .btn-outline:hover {
  background: var(--accent-color);
  color: white;
}

.privacy-iframe-container {
  width: 100%;
  height: 450px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  margin: 1rem 0;
  display: none;
}

.privacy-iframe-container.active {
  display: block;
}

.privacy-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 768px) {
  .privacy-dialog {
    width: 95vw;
    padding: 1.5rem;
    max-height: 85vh;
  }
  
  .privacy-dialog-actions {
    flex-direction: column;
  }
  
  .privacy-iframe-container {
    height: 350px;
  }
}

/* Language selector styles */
.brand-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.language-selector {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}

/* Mobile: layout orizzontale */
@media (max-width: 930px) {
  .brand-section {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
}

.lang-btn {
  background: none;
  border: 1px solid #e1e5e9;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  border-color: #7b16ff;
  color: #7b16ff;
}

.lang-btn.active {
  background: #7b16ff !important;
  border-color: #7b16ff;
  color: white;
  border: 1px solid #e1e5e9;
}

/* Navigation styles - Highlighted nav (Risorse) */
.site-header .nav-inner nav a.highlighted-nav {
  position: relative !important;
  z-index: 1 !important;
}

/* Sottolineatura SEMPRE visibile per Risorse */
.site-header .nav-inner nav a.highlighted-nav::before {
  content: '' !important;
  position: absolute !important;
  bottom: 0px !important;
  left: -3px !important;
  right: -3px !important;
  height: 6px !important;
  background: #ffeb3b !important;
  background: linear-gradient(90deg, #ffeb3b 0%, #ffd54f 25%, #ffc107 50%, #ffd54f 75%, #ffeb3b 100%) !important;
  border-radius: 3px !important;
  transform: skewX(-8deg) rotate(-1deg) !important;
  box-shadow: 0 2px 4px rgba(255, 193, 7, 0.5) !important;
  opacity: 1 !important;
  z-index: -1 !important;
  display: block !important;
  visibility: visible !important;
  transition: all 0.3s ease !important;
}

/* Hover: cambia solo il colore */
.site-header .nav-inner nav a.highlighted-nav:hover::before {
  background: #2196f3 !important;
  background: linear-gradient(90deg, #2196F3 0%, #42A5F5 25%, #1976D2 50%, #42A5F5 75%, #2196F3 100%) !important;
  box-shadow: 0 2px 4px rgba(33, 150, 243, 0.5) !important;
}

/* Active navigation item - riquadro attorno all'opzione selezionata */
.site-header .nav-inner nav a.active-nav {
  position: relative !important;
  background: rgba(93, 214, 255, 0.1) !important;
  border: 2px solid rgba(93, 214, 255, 0.6) !important;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  margin: 0 2px !important;
  color: #5dd6ff !important;
  font-weight: 600 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(93, 214, 255, 0.25) !important;
  transition: all 0.3s ease !important;
}

/* Hover effect for active nav */
.site-header .nav-inner nav a.active-nav:hover {
  background: rgba(93, 214, 255, 0.15) !important;
  border-color: rgba(93, 214, 255, 0.8) !important;
  box-shadow: 0 6px 16px rgba(93, 214, 255, 0.35) !important;
  transform: translateY(-2px) !important;
}

/* Override default hover effects for active nav */
.site-header .nav-inner nav a.active-nav:after {
  display: none !important;
}

/* Special handling for highlighted-nav + active-nav combination */
.site-header .nav-inner nav a.highlighted-nav.active-nav::before {
  display: none !important;
}

.site-header .nav-inner nav a.highlighted-nav.active-nav {
  background: rgba(255, 235, 59, 0.15) !important;
  border-color: rgba(255, 193, 7, 0.8) !important;
  color: #ffc107 !important;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3) !important;
}

.site-header .nav-inner nav a.highlighted-nav.active-nav:hover {
  background: rgba(255, 235, 59, 0.25) !important;
  border-color: rgba(255, 193, 7, 1) !important;
  box-shadow: 0 6px 16px rgba(255, 193, 7, 0.4) !important;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  /* Dark mode overrides can be added here if needed */
}