:root {
  --body-background-color:#f7f7f7;
  --body-font-color: #111111;

  --link-color: #004578;
  --btn-background-color: rgba(0, 69, 120, 0.75);
  --btn-shadow: rgba(0, 69, 120, 1);
  --alt-box-bg-color: #ECECEC;
  --content-box-table-cell-border-color: #d0d0d0;
  --content-box-table-cell-active-text-color: #111111;
  --highlight-border-color: #a4c1b2;
  --horizontal-search-bg: #ffffff;

  --top-navigation-background-color: #fcfcfc;
  --top-navigation-selector-color: rgba(0, 0, 0, 0.5);
  --top-navigation-selector-box-shadow-color: rgba(0, 69, 120, 0.75);
  --top-navigation-button-border-color: rgba(0, 69, 120, 1);
  --top-navigation-menu-border-color: #E3E3E3;

  --header-background-color: #f7f7f7;
  --header-tabs-icon-active-filter: brightness(0.066); 
  --header-search-form-title-color: #555555;

  --form-disabled-background-color: #EFEFEF;
  --form-checked-background-color: #0d2a45;
  --form-checked-background-color-hover: #0d2a45;
  --form-checked-background-color-active: #0d2a45;
  --form-checked-text-color: #ffffff;
  --form-background-color: #EFEFEF;
  --form-field-line-color: rgba(0, 69, 120, 0.5);
  --form-field-line-color-hover: #004578;
  --form-error-background-color: #fff2f4;
  --form-error-text-color: #c92a44;
  --form-error-shadow: #f79d9d;

  --middle-no-sidebar-background-color: #EFEFEF;
  --bottom-no-sidebar-background-color: #f7f7f7;

  --featured-no-sidebar-background-color: #ffffff;
  --featured-background-color: #f7f7f7;
  --featured-title-color: #111111;
  --featured-accounts-background-color: #ffffff;

  --listing-card-icon-color: #0d2a45;
  --listing-card-active-icon-color: #b3b3b3;
  
  --listing-print-icon: url("../img/print.svg");
  --listing-favorite-icon: url("../img/like.svg");
  --listing-favorite-icon-active: url("../img/like-active.svg");
  --listing-compare-icon: url("../img/compare.svg");
  --listing-compare-icon-active: url("../img/compare-active.svg");
  --listing-gallery-media-background-color: #ffffff;
  --listing-mask-background-color: rgba(255, 255, 255, 0.6);
  --listing-thumbnail-background-color: #f2f2f2;

  --content-background-color: #ffffff;
  --content-alt-background-color: #ffffff;

  --info-field-color: #888888;
  --category-color: #5e5e5e;
  --category-color-hover: #000000;
  --empty-category-color: #bbbbbb;
  --fieldset-header-background-color: #dddddd;
  --icon-filter: brightness(1);
  --icon-filter-background: brightness(20);
  --icon-filter-img-background: brightness(0);
  --upload-zone-background-color: #f3f3f3;
  --plans-border-color: #d4d4d4;
  --steps-background-color: #efefef;
  --popup-mask-background-color: rgba(0, 0, 0, 0.3);
  --side-block-button-border-color: rgba(0, 69, 120, 1);
  --table-list-border-color: #dddddd;
  --table-list-me-border-color: #E3E3E3;
  --tabs-active-background-color: #0d2a45;
  --tabs-hover-color: #111111;
  --tabs-side-block-active-background-color: #0d2a45;
  --tabs-side-block-border-color: #d4d4d4;
  --svg-icon-fill: #999999;
  --dropdown-arrow: url("../img/dropdown-arrow.svg");

  --footer-background-color: #0d2a45;
  --footer-text-color: rgba(255, 255, 255, 0.5);
  --footer-menu-title-color: rgba(255, 255, 255, 0.5);
  --footer-menu-link-color: #ffffff;
  --footer-btn-background-color: #0d2a45;
  --footer-input-hover-background-color: #0d2a45; 
  --footer-btn-shadow: rgba(45, 59, 52, 0.65);
  --invert: invert(0);
}

#theme-switcher-sun {
  display: none;
}

.upload-zone > span { font-size: 0.875em !important; }
.upload-zone { height: 70px !important; }
select.w120 { width: auto !important; min-width: 160px !important; }
.ag_fields { float: none !important; clear: both !important; width: 100% !important; padding-left: 0 !important; margin-top: 8px !important; }

.agreement-fields {
    clear: both !important;
    width: 100% !important;
    float: none !important;
    text-align: center !important;
    margin-top: 15px !important;
}

.agreement-fields .ag_fields {
    display: inline-block !important;
    text-align: left !important;
    padding-left: 0 !important;
}

.file-input { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.file-input input[type=file] { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.file-input span { display: inline-block; padding: 6px 16px; background: #1E40AF; color: #fff; border-radius: 6px; cursor: pointer; z-index: 1; }
.file-input input[type=text] { border: 1px solid #ccc; padding: 4px 8px; border-radius: 4px; min-width: 200px; }

.file-input input.file {
    left: 0 !important;
    width: 100% !important;
    cursor: pointer !important;
}

.file-input input.file {
    width: 100% !important;
    left: 0 !important;
    top: 0 !important;
    cursor: pointer !important;
}

.field-documents.disabled-field,
.field-docs_docsas.disabled-field {
    opacity: 0.4 !important;
    pointer-events: none !important;
}

.selected-ad-type.disabled {
    display: none !important;
}

@media screen and (max-width: 767px) {
    .tl-card ul.select-category select {
        min-height: 120px !important;
    }
}

@media screen and (max-width: 767px) {
    .tl-card ul.select-category select {
        min-height: 48px !important;
        height: auto !important;
        size: 1 !important;
    }
}

@media screen and (max-width: 767px) {
    div.plans-chart ul.plans {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    div.plans-chart.point1 {
        max-width: 100% !important;
        padding: 8px !important;
    }
    .popup-window {
        width: 95vw !important;
        max-width: 95vw !important;
        left: 2.5vw !important;
        right: 2.5vw !important;
    }
}

@media screen and (max-width: 767px) {
    .popup > div {
        left: 5px !important;
        right: 5px !important;
        top: 5px !important;
        bottom: 5px !important;
        width: auto !important;
        transform: none !important;
        margin: 0 !important;
        overflow-y: auto !important;
    }
    .popup > div > div {
        width: 100% !important;
        max-width: 100% !important;
        overflow-y: auto !important;
    }
    .popup > div > div div.body {
        overflow-y: auto !important;
        max-height: 70vh !important;
    }
}

@media screen and (max-width: 768px) {
    .popup > div {
        left: 5px !important;
        right: 5px !important;
        top: 5px !important;
        bottom: 5px !important;
        width: auto !important;
        transform: none !important;
        margin: 0 !important;
        overflow-y: auto !important;
    }
    .popup > div > div {
        width: 100% !important;
        max-width: 100% !important;
        overflow-y: auto !important;
    }
    .popup > div > div div.body {
        overflow-y: auto !important;
        max-height: 75vh !important;
    }
    .plans-chart {
        width: 100% !important;
        max-width: 100% !important;
    }
    .plans-chart ul.plans {
        grid-template-columns: 1fr !important;
    }
}


@media screen and (max-width: 400px) {
    .popup > div {
        left: 5px !important;
        right: 5px !important;
        top: 5px !important;
        bottom: 5px !important;
        width: auto !important;
        transform: none !important;
        margin: 0 !important;
        overflow-y: auto !important;
        max-width: calc(100vw - 10px) !important;
        box-sizing: border-box !important;
    }
    .popup > div > div {
        width: 100% !important;
        max-width: 100% !important;
        overflow-y: auto !important;
        padding: 0.75rem !important;
        box-sizing: border-box !important;
    }
    .popup > div > div div.body {
        overflow-y: auto !important;
        max-height: 75vh !important;
    }
    .plans-chart {
        width: 100% !important;
        max-width: 100% !important;
    }
    .plans-chart ul.plans {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    .plans-chart ul.plans > li {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
    .plans-chart ul.plans > li > div.frame {
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }
    div.plans-chart ul.plans > li > div.frame > div.plan-header {
        padding: 12px 10px 10px !important;
        overflow: hidden !important;
        word-wrap: break-word !important;
        white-space: normal !important;
    }
    div.plans-chart ul.plans > li > div.frame > div.plan-features {
        padding: 8px 10px !important;
    }
}

.reg-card .plan-selector-wrap div.plan-btn-label {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    background: #fff !important;
    color: #1e3a5f !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-size: 0.875em !important;
    font-weight: 600 !important;
    border: 2px solid #1e3a5f !important;
}

.reg-card ul.plans > li.plan-selected .plan-selector-wrap div.plan-btn-label {
    background: #1e3a5f !important;
    color: #fff !important;
    border: 2px solid #1e3a5f !important;
}

@media screen and (max-width: 700px) {
    .plans-chart ul.plans > li {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
    .plans-chart ul.plans > li > div.frame {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    div.plans-chart {
        overflow: hidden !important;
        width: 100% !important;
    }
}

@media screen and (max-width: 700px) {
    div.popup div.plans-chart.point1,
    div.plans-chart.point1 {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media screen and (max-width: 700px) {
    .popup > div > div div.body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }
    .popup > div > div div.body * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 480px) {
    div.popup div.plans-chart.point1,
    div.plans-chart.point1 {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    div.plans-chart.point1 ul.plans {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px;
        padding: 0;
        margin: 0;
    }
    div.plans-chart.point1 ul.plans > li,
    div.plans-chart.point1 ul.plans > li > div.frame {
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    div.popup {
        max-height: 90vh;
        overflow-y: auto;
    }
}

@media (min-width: 481px) and (max-width: 700px) {
    div.popup div.plans-chart.point1,
    div.plans-chart.point1 {
        min-width: 0 !important;
        width: 95% !important;
        max-width: 95% !important;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    div.plans-chart.point1 ul.plans {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 15px;
        padding: 0;
        margin: 0 auto;
    }
    div.plans-chart.point1 ul.plans > li,
    div.plans-chart.point1 ul.plans > li > div.frame {
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    div.popup {
        max-height: 85vh;
        overflow-y: auto;
    }
}

@media (max-width: 700px) {
    .popup > div {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .popup > div > div {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .popup > div > div > div.body {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        max-height: 70vh !important;
    }
}

@media (max-width: 700px) {
  div.popup div.plans-chart.point1 {
      min-width: auto !important;
      width: 90vw !important;
      max-width: 90vw !important;
  }
  div.plans-chart ul.plans {
      display: grid;
      grid-template-columns: 1fr !important;
      gap: 15px;
  }
  div.plans-chart ul.plans > li,
  div.plans-chart ul.plans > li > div.frame {
      min-width: 0 !important;
  }
  .popup > div > div > div.body {
      max-height: 70vh;
      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 700px) {
    body.popup-no-scroll {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
    }
    body.popup-no-scroll .popup > div > div div.body {
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch !important;
        max-height: 65vh !important;
    }
}

body.popup-no-scroll {
    overflow: hidden !important;
}

div.popup .body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

body.popup-no-scroll {
    overflow: hidden !important;
}

div.popup {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column !important;
}

div.popup > div,
div.popup > div > div {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

div.popup .body {
    flex: 1 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}


/* =========================
   FINAL POPUP + MOBILE FIX
   (Flynax 4.9.3)
   ========================= */

/* Root */
html, body {
    height: 100% !important;
}

/* Body scroll lock */
body.popup-no-scroll {
    overflow: hidden !important;
}

/* Popup Container */
div.popup {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;

    display: flex !important;
    flex-direction: column !important;

    overflow: hidden !important; /* nur hier */

    z-index: 99999 !important;
}

/* Wrapper FIX (ohne Scroll-Blocker!) */
div.popup > div,
div.popup > div > div {
    display: flex !important;
    flex-direction: column !important;

    height: 100% !important;
    max-height: 100% !important;

    overflow: visible !important; /* 🔥 wichtig */
}

/* Scroll Container (DER KEY) */
div.popup .body {
    flex: 1 1 auto !important;
    height: 0 !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    -webkit-overflow-scrolling: touch !important;
}

/* Safety */
div.popup .body * {
    max-width: 100%;
}

/* =========================
   PLANS CHART FIX
   ========================= */

.plans-chart ul.plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.plans-chart li.plan-selected .plan-btn-label {
    background: #0d2a45 !important;
    color: #fff !important;
}

/* =========================
   MOBILE FIX
   ========================= */

@media (max-width: 700px) {

    /* Grid untereinander */
    .plans-chart ul.plans {
        grid-template-columns: 1fr !important;
    }

    /* min-width BUG entfernen */
    div.popup div.plans-chart.point1,
    div.plans-chart.point1 {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* bessere Scrollbarkeit */
    div.popup .body {
        padding-bottom: 20px;
    }
}
/* =========================
   FINAL MOBILE POPUP + PLANS-CHART FIX
   Flynax 4.9.3
   ========================= */

/* Root */
html, body {
    height: 100% !important;
}

/* Body scroll lock */
body.popup-no-scroll {
    overflow: hidden !important;
}

/* Popup Container */
div.popup {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;

    display: flex !important;
    flex-direction: column !important;

    overflow: hidden !important;
    z-index: 99999 !important;
}

/* Wrapper FIX (ohne Scroll-Blocker!) */
div.popup > div,
div.popup > div > div {
    display: flex !important;
    flex-direction: column !important;

    height: 100% !important;
    max-height: 100% !important;

    overflow: visible !important; /* wichtig */
}

/* Scroll Container */
div.popup .body {
    flex: 1 1 auto !important;
    height: 0 !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    -webkit-overflow-scrolling: touch !important;
}

/* Safety */
div.popup .body * {
    max-width: 100%;
}

/* Plans Chart */
.plans-chart ul.plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.plans-chart li.plan-selected .plan-btn-label {
    background: #0d2a45 !important;
    color: #fff !important;
}

/* Mobile Fix */
@media (max-width: 700px) {
    /* Grid untereinander */
    .plans-chart ul.plans {
        grid-template-columns: 1fr !important;
    }

    /* min-width BUG entfernen */
    div.popup div.plans-chart.point1,
    div.plans-chart.point1 {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* bessere Scrollbarkeit */
    div.popup .body {
        padding-bottom: 20px;
    }
}

/* =========================
   FINAL POPUP + MOBILE FIX
   (Flynax 4.9.3)
   ========================= */

/* Root */
html, body {
    height: 100% !important;
}

/* Body scroll lock */
body.popup-no-scroll {
    overflow: hidden !important;
}

/* Popup Container */
div.popup {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;

    display: flex !important;
    flex-direction: column !important;

    overflow: hidden !important;

    z-index: 99999 !important;
}

/* Wrapper FIX */
div.popup > div,
div.popup > div > div {
    display: flex !important;
    flex-direction: column !important;

    height: 100% !important;
    max-height: 100% !important;

    overflow: visible !important;
}

/* Scroll Container */
div.popup .body {
    flex: 1 1 auto !important;
    height: 0 !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    -webkit-overflow-scrolling: touch !important;
}

/* Safety */
div.popup .body * {
    max-width: 100%;
}

/* =========================
   PLANS CHART FIX
   ========================= */

.plans-chart ul.plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.plans-chart li.plan-selected .plan-btn-label {
    background: #0d2a45 !important;
    color: #fff !important;
}

/* =========================
   MOBILE FIX
   ========================= */

@media (max-width: 700px) {

    /* Grid untereinander */
    .plans-chart ul.plans {
        grid-template-columns: 1fr !important;
    }

    /* min-width BUG entfernen */
    div.popup div.plans-chart.point1,
    div.plans-chart.point1 {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* bessere Scrollbarkeit */
    div.popup .body {
        padding-bottom: 20px;
    }
}



/* =========================
   TORVIA FIX 2026-10-01: Popups kompakt statt volle Hoehe
   Hebt "height: 100% !important" der Bloecke oben auf.
   ========================= */
div.popup > div,
div.popup > div > div {
    height: auto !important;
}
div.popup > div {
    max-height: calc(100vh - 20px) !important;
}
div.popup > div > div {
    max-height: calc(100vh - 30px) !important;
}
div.popup .body {
    flex: 0 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
}
@media screen and (max-width: 768px) {
    div.popup > div {
        top: 50% !important;
        bottom: auto !important;
        transform: translateY(-50%) !important;
    }
}

@media (max-width: 767px) { .a2a_floating_style { display: none !important; } }

/* Mobile: show project actions before decorative hero image */
@media (max-width: 768px) {
  html body #torvia-home section.th-hero .th-inner .th-hero-grid .th-hero-right { order: 2 !important; }
}


/* Hide duplicate logged-in dashboard menu block */
aside.left.second-copy > section.account_area { display: none !important; }


/* Mobile main menu: improve the hamburger tap target and contrast. */
@media screen and (max-width: 767px) {
  .main-menu span.menu-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    margin-left: 8px !important;
    margin-right: 12px !important;
    border: 2px solid #315f76 !important;
    border-radius: 9px !important;
    background: #e8f2f6 !important;
    box-shadow: 0 2px 5px rgba(21, 62, 83, 0.22) !important;
    color: #153e53 !important;
    font-size: 1rem !important;
    flex-shrink: 0 !important;
  }
  .main-menu span.menu-button > svg {
    width: 25px !important;
    height: 25px !important;
  }
}

/* Keep every public navigation item visible on small screens. */
@media screen and (max-width: 767px) {
  .main-menu {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .main-menu .menu-content.pt-md-0 {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 8px 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 4px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }
  .main-menu .menu-content.pt-md-0 > a {
    white-space: nowrap !important;
    padding: 8px 4px !important;
  }
}
@media screen and (max-width: 360px) {
  .main-menu .menu-content.pt-md-0 {
    overflow-x: visible !important;
    overflow-y: visible !important;
  }
}

/* Harmonized mobile menu control: consistent in logged-out and account views. */
@media (max-width: 767px) {
  .main-menu span.menu-button,
  .main-menu .menu-button,
  .user-navbar span.menu-button,
  .user-navbar .menu-button {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    border: 1px solid #d5dfe3 !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: 0 1px 3px rgba(30, 55, 67, .12) !important;
    color: #526a74 !important;
    line-height: 1 !important;
  }
  .main-menu span.menu-button svg,
  .main-menu .menu-button svg,
  .user-navbar span.menu-button svg,
  .user-navbar .menu-button svg {
    width: 20px !important;
    height: 20px !important;
    fill: currentColor !important;
    stroke: currentColor !important;
  }
  .main-menu span.menu-button::before,
  .main-menu span.menu-button::after,
  .main-menu .menu-button::before,
  .main-menu .menu-button::after,
  .user-navbar span.menu-button::before,
  .user-navbar span.menu-button::after,
  .user-navbar .menu-button::before,
  .user-navbar .menu-button::after {
    border-color: #526a74 !important;
    background-color: #526a74 !important;
  }
}

/* Keep the hamburger glyph equally readable on public and signed-in pages. */
@media (max-width: 767px) {
  body .main-menu span.menu-button > svg,
  body .user-navbar span.menu-button > svg {
    width: 28px !important;
    height: 20px !important;
  }
}
