/* HEADER WRAPPER */
.lt-header {
    background: #151a20;
    height: 64px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    color: white;
    font-family: 'Roboto', sans-serif;
}

.lt-header-inner {
    height: 64px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* LOGO */
.lt-logo img {
    height: 34px;
}

/* TOP NAVIGATION */
.lt-nav .lt-menu {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 64px;
    align-items: center;
}

/* KĻŪDAS FOKUSS: Nodrošina, ka pele neaizbēg no .lt-item (hover zonas) */
.lt-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.lt-link {
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: .2s;
    display: block;
}

.lt-link:hover {
    opacity: .7;
}

/* DROPDOWN - Mēs izņemam :hover no CSS, lai to kontrolētu JS */

/* DROPDOWN - Mēs izņemam :hover no CSS, lai to kontrolētu JS */
.lt-dropdown {
    position: absolute;
    /* Nulificējam atstarpes starp nolaižamo elementu un hover zonu.
       Top: 64px ir header augstums. Lai pārklātos, sākums jāsamazina.*/
    top: 64px !important;
    left: 0;

    /* Vizuālais labojums: samazinām augšējo malu, lai tas izskatītos labi */
    margin-top: 0;
    padding-top: 12px; /* Atstājam padding satura atdalīšanai */

    background: #1f252c;
    padding-bottom: 12px;
    min-width: 240px;
    border-radius: 6px;
    list-style: none;
    margin-bottom: 0;

    /* Paslēpj pēc noklusējuma ar vizuālajām pārejām */
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.1s ease-in-out, visibility 0.1s ease-in-out;
}

/* KLASES, KO AKTIVIZĒ JAVASCRIPT */
.lt-dropdown-open {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.lt-dropdown li a {
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    display: block;
    font-size: 14px;
}

/* LANGUAGE SWITCHER - Atstājam CSS kontroli, jo tas nav problemātisks */
.lt-lang {
    position: relative;
    cursor: pointer;
}

.lt-lang-current {
    border: 1px solid #fff3;
    padding: 4px 12px;
    border-radius: 6px;
}

.lt-lang-dropdown {
    display: none;
    background: #1f252c;
    position: absolute;
    top: 36px;
    left: 0;
    list-style: none;
    padding: 6px 0;
    min-width: 80px;
    border-radius: 6px;
}

.lt-lang-dropdown li a {
    display: block;
    padding: 6px 12px;
    color: #fff;
    text-decoration: none;
}

.lt-lang:hover .lt-lang-dropdown {
    display: block;
}

/* MOBILE - Atstājam nemainīgu */
.lt-burger {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}

.lt-burger span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
}

@media(max-width: 960px){
    .lt-nav, .lt-lang {
        display: none;
    }
    .lt-burger {
        display: flex;
    }

    .lt-mobile-menu {
        background: #151a20;
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        height: calc(100vh - 64px);
        display: none;
        flex-direction: column;
        padding: 20px;
        gap: 18px;
    }

    .lt-mobile-menu a {
        color: white;
        font-size: 18px;
        padding: 6px 0;
        display: block;
    }
}

.lt-mobile-open .lt-mobile-menu {
    display: flex;
}


.lt-header-inner {
    position: relative; /* vajag absolūtajai centrēšanai */
}

.lt-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    height: 64px;
    display: flex;
    align-items: center;
    font-size: 21px;
    font-weight: 650;
    color: #fff;
    white-space: nowrap;
    cursor: pointer;
    pointer-events: none; /* lai netraucē klikšķus logo u.c. */
}

@media(max-width: 960px){
  .lt-title { display: none; }
}


    .hidden {
        display: none !important;
    }

    /* ====== PERFECT FORM LAYOUT ====== */

    .form-row-3 {
        display: grid;
        grid-template-columns: 0.7fr 0.9fr 1.7fr;
        gap: 26px;
        align-items: center;
    }

    .form-col {
        display: flex;
        flex-direction: column;
    }

    .form-col label {
        margin-bottom: 6px;
        font-size: 15px;
    }

    input[type="file"] {
        width: 100%;
        box-sizing: border-box;
    }

    .report-type-options {
        display: flex !important;
        flex-direction: row !important;
        gap: 18px !important;
        align-items: center !important;
        margin-top: 0;
    }

    .report-type-option {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    /* REPORT WRAPPER — centrēts un identiskas platuma robežas kā .card */
    .report-wrapper{
      max-width: 1000px;
      width: 100%;
      margin: 0 auto 80px auto;   /* noņem margin-top */
      padding: 0;
      box-sizing: border-box;
    }

    .report-wrapper { scroll-margin-top: 64px; } /* 64px header + neliela rezerve */

    .report-iframe{
      width: 100%;
      height: 100vh;
      border: none;
      margin-top: 0;              /* bija 20px */
      display: block;
    }

    .report-buttons {
        display: flex;
        justify-content: center;
        gap: 20px;
        width: 100%;
        margin: 0 auto 20px auto;
    }

    .report-buttons button {
        flex: 1;
        max-width: 300px;
    }

    #showFormBtn
    {max-width: 90px;}

    #goTopBtn
    {max-width: 90px;}

    #savePdfBtn
    {max-width: 120px;}

    #saveHtmlBtn
    {max-width: 120px;}

    #fullViewBtn {
      border: 3px solid #0052cc;
      border-radius: 6px;
   }


    :root { --lt-header-h: 64px; }

    body {
        font-family: "Segoe UI", Arial, sans-serif;
        background:#1d242d;
        color:#e5e5e5;
        margin: 0 auto;
    }

   body { padding-top: var(--lt-header-h); }

    .card {
        max-width: 1000px;
        background: #1d242d;
        border: 0px solid #546881;
        padding-top: 20px;
        border-radius: 10px;
        margin-top: 20px;
        margin-left: auto;
        margin-right: auto;
    }

    input, textarea, select {
        background: #111519;
        border: 1px solid #546881;
        color: white;
        padding: 0px;
        border-radius: 6px;
        margin-top: 6px;
    }

    textarea{
        background: #111519;
        border: 1px solid #546881;
        color: white;
        padding: 10px;
        width: 98%;
        border-radius: 6px;
        margin-top: 6px;
        resize: vertical;
    }

    button {
        padding: 10px;
        border-radius: 6px;
        border: none;
        cursor: pointer;
        font-size: 15px;
        width: 300px!important;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }

    #runBtn {
        background:#0066ff;
        color:white;
    }

    #runBtn:hover { background:#0052cc; }

    #exitBtn {
        background:#777;
        color:white;
    }

    .row-flex {
        display:flex;
        gap:20px;
    }

    .input-block { flex:1; }
    #out { margin-top:20px; }

    .actions {
        display: flex;
        gap: 10px;
        margin-bottom: 20px;
    }

    .actions button {
        width: auto;
        flex-grow: 0;
    }

    /* MODAL STYLES */

    .modal-overlay {
        display: none;
        position: fixed;
        z-index: 3000;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(255, 255, 255, 0.55);
        backdrop-filter: blur(3px);
        justify-content: center;
        align-items: flex-start;
        padding-top: 40px;
        overflow: hidden;
    }

    .modal-content {
        width: 85%;
        max-width: 900px;
        max-height: 88vh;
        background: #ffffff;
        color: #222;
        border-radius: 12px;
        border: 1px solid #d0d0d0;
        box-shadow: 0 8px 25px rgba(0,0,0,0.25);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .modal-header {
        background: #f4f4f4;
        border-bottom: 1px solid #ddd;
        padding: 12px 20px;
        display: flex;
        justify-content: flex-end;
    }

    .close-btn {
        font-size: 26px;
        cursor: pointer;
        color: #777;
    }
    .close-btn:hover {
        color: #333;
    }

    .modal-body {
        padding: 22px 26px;
        overflow-y: auto;
        font-size: 15px;
        line-height: 1.55;
    }

    .modal-body h2,
    .modal-body h3,
    .modal-body h4 {
        color: #333;
    }

    .modal-body code {
        background: #f1f1f1;
        padding: 2px 4px;
        border-radius: 4px;
    }

    .code-block-modal {
        background: #f6f6f6;
        border: 1px solid #ddd;
        padding: 12px;
        border-radius: 6px;
        margin: 10px 0 18px;
    }

    .modal-footer {
        background: #f4f4f4;
        border-top: 1px solid #ddd;
        padding: 12px 20px;
        display: flex;
        justify-content: center;
    }

    .modal-footer button {
        background: #0078ff;
        color: white;
        border: none;
        padding: 10px 25px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 15px;
    }
    .modal-footer button:hover {
        background: #005fcc;
    }

    .button-row {
        display: flex;
        gap: 10px;
        justify-content: center;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    #infoHelpBtn {
        background: #777;
        color: white;
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    .loading {
        font-size: 18px;
        font-weight: 600;
        color: #0066ff;
        text-align: center;
        padding: 30px;
    }

    .loading2 {
        color: #0066ff;
        text-align: center;
    }
    .loading2 .spin {
        display: inline-block;
        margin-right: 10px;
        font-size: 1.1em;
        animation: spin 1.5s linear infinite;
    }

    .loading .spin {
        display: inline-block;
        margin-right: 10px;
        font-size: 1.2em;
        animation: spin 1.5s linear infinite;
    }

    input[type="radio"] {
        width: auto;
        background: transparent;
        border: none;
        padding: 0;
        margin-top: 0;
    }

    .report-type-options {
        display: flex;
        flex-direction: row;
        gap: 20px;
        align-items: center;
    }

    .report-type-option {
        display: flex;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        margin-top: 0;
    }

    .report-type-option span {
        font-size: 14px;
    }

    /* Header poga "Back to editor" */
    .lt-header-btn {
        margin-left: 0px;
        padding: 6px 6px;
        border-radius: 999px;
        border: 1px solid #546881;
        background:#111519;
        color:#e5e5e5;
        font-size:13px;
        cursor:pointer;
        white-space: nowrap;
    }
    .lt-header-btn{
      width: auto !important;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin: 0 !important;
    }
    .lt-header-btn:hover {
        background:#1f2933;
    }
    .lt-nav .lt-menu{
      gap: 10px;   /* bija 32px */
    }


    .seo-copy{
      max-width: 1000px;
      margin: 18px auto 0 auto;
      padding: 18px 18px 8px 18px;
      background: #1d242d;
      border: 0px solid #546881;
      border-radius: 10px;
      box-sizing: border-box;
    }
    .seo-copy h2{
      margin: 0 0 8px 0;
      font-size: 18px;
      color: #e5e5e5;
    }
    .seo-copy h3{
      margin: 16px 0 8px 0;
      font-size: 15px;
      color: #e5e5e5;
    }
    .seo-copy p, .seo-copy li{
      font-size: 14px;
      line-height: 1.55;
      color: #cfd8e3;
    }
    .seo-copy ul{
      margin: 8px 0 0 18px;
    }
    .seo-cta{
      margin-top: 14px;
      padding-top: 12px;
      border-top: 1px solid #2b3a4a;
    }


/* Vienāds augstums visām header pogām */
:root { --lt-btn-h: 27px; }

.lt-header-btn{
  height: var(--lt-btn-h);
  padding: 0 12px;          /* vertikāli 0, lai nelēkā augstums */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
}

/* FontAwesome ikona nedrīkst “piebīdīt” pogu augstāk */
.lt-header-btn i{
  font-size: 0.9em !important;           /* tāds pats kā tekstam */
  line-height: 1;
  display: block;
}

.file-input-wrap{
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.clear-file-btn{
  height: 22px;
  width: 30px !important;
  padding: 0 6px;
  line-height: 20px;
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  transform: translateY(2px);
}

.clear-file-btn:hover{
  border-color: rgba(0,0,0,0.45);
}

.clear-file-btn.is-hidden{
  display: none;
}


.lt-header{
  top: 0;
  z-index: 10000;
}

.lt-title{
  cursor: pointer;
  pointer-events: auto;
}
