/**
 * TabNav Popup Styles - Accessible Version
 * Standalone CSS file to be included on all pages
 */

/* Base colors */
:root {
  --tnv-button-color: #8E56DC;
  --tnv-title-color: #3B3F44;
  --tnv-text-color: #6E6B78;
}

/* Screen reader only class */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Popup overlay */
.tnv-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  direction: rtl;
}

.tnv-popup-overlay *:focus-visible {
  outline:2px black solid;
  outline-offset:3px;
}
.tnv-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Popup container */
.tnv-popup-container {
  background-color: white;
  border-radius: 20px;
  width: 95%;
     max-width: 1404px;
  position: relative;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
  z-index:32767;
}

.tnv-popup-overlay.active .tnv-popup-container {
  transform: scale(1);
}

/* Close button */
.tnv-popup-close {
  position: absolute;
  top: 12px;
  left: 12px;
  background: transparent;
  border: none;
  font-size: 26px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #444;
  z-index: 10;
  border-radius: 50%;
  transition: background-color 0.2s;
  font-weight: bold;
}

.tnv-popup-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* .tnv-popup-close:focus {
  outline: 2px solid #a978e9;
  outline-offset: 2px;
} */



/* Popup content - two columns */
.tnv-popup-content {
  display: flex;
  flex-direction: row-reverse; /* Image on left in RTL */
}

/* Left side - image (will appear on left in RTL) */
.tnv-popup-left {
  flex: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tnv-popup-main-img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* Right side - content */
.tnv-popup-right {
  flex: 0.8;
  padding: 40px;
  text-align: right;
  display: flex;
  flex-direction: column;
  padding-left: 0;
}

/* Logo header */
.tnv-popup-header {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 30px;
}

.tnv-popup-logo-text {
  display: flex;
  flex-direction: column;
  margin-right: 10px;
  text-align: right;
}

.tnv-popup-logo-text span:first-child {
  font-weight: 600;
  font-size: 19px;
  color: var(--tnv-title-color);
}

.tnv-popup-subtitle {
  font-size: 16px;
  color: #666;
  margin-top: -3px;
}

.tnv-popup-logo-icon {
  display: flex;
  justify-content: center;
  align-items: center;
}

.tnv-popup-logo-img {
  width: 50px;
  height: 50px;
}

/* Title */
.tnv-popup-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--tnv-title-color);
  line-height: 1.3;
      margin-top: 40px;
          max-width: 500px;
}

/* Description */
.tnv-popup-description {
  font-size: 16px;
  color: var(--tnv-text-color);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Buttons */
.tnv-popup-buttons {
  display: flex;
  margin-bottom: 30px;
  align-items: center;
  gap: 12px;

}


/* Footer text */
.tnv-popup-footer {
  color: var(--tnv-text-color);
  font-size: 14px;
  margin-top: auto;
}



/* Responsive styles */
@media (max-width: 1000px) {
  .tnv-popup-overlay {
    align-items: flex-start;
    padding-top: 50px;
  }
  
  .tnv-popup-container .bro-link {
    margin-top: 10px;
  }
  
  .tnv-popup-container {
    width: 95%;
    height: 100%;
    max-height: 440px;
    margin: auto auto;      
    overflow: hidden;
  }
  
  .tnv-popup-container * {
    text-align: center;
  }
  
  .tnv-popup-buttons .bro-link {
    align-self: center;
    width: 70%;
    justify-content: center;
  }
  
  .tnv-popup-content {
    flex-direction: row;
    height: 100%;
  }
  
  .tnv-popup-left {
    order: 2;
    padding: 0px;
    margin: 15px;
    min-width: 450px;
  }
  
  .tnv-popup-right {
    order: 1;
    padding: 25px 49px;
    padding-left: 0;
  }
  
  .tnv-popup-buttons {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }
  
  h2.tnv-popup-title {
    font-size: 20px;
  }
  
  .tnv-popup-header {
    margin-bottom: 20px;
  }
  
  .tnv-popup-close {
    top: 10px;
    left: 10px;
    font-size: 28px;
    width: 40px;
    height: 40px;
  }
  
  .tnv-popup-description {
    font-size: 14px;
  }
  .tnv-popup-footer  {
    font-size:12px;
  }
}

@media (min-width: 762px) and (max-width: 1000px) {
  h2.tnv-popup-title {
    font-size: 18px;
  }
  
  .tnv-popup-container {
    font-size: 14px;
  }
  
  .tnv-popup-logo-text span:first-child {
    font-size: 17px;
  }
  
  .tnv-popup-description {
    font-size: 14px;
  }
  
  .tnv-popup-buttons .bro-link {
    font-size: 10.8px;
  }
  
  .home-to-overview, .home-to-overview * {
    font-size: 14px;
  }
  
  .tnv-popup-right {
    padding: 25px 20px;
  }
  
  .tnv-popup-subtitle {
    font-size: 14px;
  }
  
  .tnv-popup-main-img {
    min-width: 450px;
    height: 90%;
    margin: auto auto;
  }
  .tnv-popup-footer  {
    font-size:12px;
  }
}

/* Small screen specific styles */
@media (max-width: 762px) {
  .tnv-popup-overlay {
    padding-top: 0;
  }
  
  .tnv-popup-container {
    max-height: unset;
    border-radius: 0;    
    margin: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding-top:40px;
  }
  
  .tnv-popup-content {
    flex-direction: column;
    width: 90%;
    margin: 0 auto;      
  }
  
  .tnv-popup-header {
    margin-bottom: 20px;
    text-align: right;
  }
  
  .tnv-popup-logo-text {
    text-align: right;
  }
  
  .tnv-popup-title {
    margin-bottom: 5px;
    text-align: right;
  }
  
  .tnv-popup-description {
    margin-bottom: 10px;
    text-align: right;
  }
  
  .tnv-popup-right {
    padding: 40px 16px;
  }
  
  .tnv-popup-buttons {
    flex-direction: row;
    margin-bottom: 25px;
    margin-top:25px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .tnv-popup-buttons .bro-link {
    width: 100%;
    min-width: 185px;
  }
  
  .tnv-popup-left {
    margin: 0;
    min-width: unset;
    justify-content: start;
  }
  
  .tnv-popup-footer {
    margin-bottom: 0;
    margin-top: 0;
    text-align: right;
    font-size:12px;
  }
  
  #home-to-overview {
    margin-top: 10px;
  }
  
  #home-to-overview > span {
    margin-top: 10px;
  }
  
  .tnv-popup-main-img {
    width: 100%;
    height: auto;
    min-width: unset;
    align-self:start;
  }
}

/* Utility class for when popup is shown */
body.tnv-popup-open {
  overflow: hidden;
}