/* ======================================================
   TAB SYSTEM
   ====================================================== */

.tabber { display: none; }
.tabber .tabbertab { display: none; }
.tabber .tabbertab:first-child { display: flex; } /* fallback if JS fails */
.tabberlive { display: block; }
.tabberlive .tabbertab { display: none; }
.tabberlive .tabbertab.tabbertabhide { display: none; }

/* ======================================================
   TAB NAVIGATION
   ====================================================== */

ul.tabbernav {
    margin: 0;
    padding: 5px 0 0;
    border-bottom: 1px solid #d9d9d9;
}

ul.tabbernav li {
    list-style: none;
    display: inline;
    margin: 0;
    padding: 0 5px 0 0;
    white-space: nowrap;
}

ul.tabbernav li a {
    display: inline-block;
    min-width: 50px;
    padding: 5px 8px;
    margin: 0 0 -1px;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.5em;
    text-decoration: none;
    color: #000;
    border: 1px solid #d9d9d9;
    border-bottom: none;
    background: #e0e0e0;
}

ul.tabbernav li a:hover {
    background: #abadb3;
    color: #fff;
}

ul.tabbernav li.tabberactive a {
    background: #fff;
    border-bottom: 1px solid #fff;
}

ul.tabbernav li.tabberactive a:hover {
    background: #fff;
    color: #000;
}

/* ======================================================
   TAB CONTENT
   ====================================================== */

.tabberlive .tabbertab {
    margin: 0;
    padding: 12px 0 8px;
    border: 1px solid #d9d9d9;
    border-top: 0;
    min-height: 80px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
}

.tabberlive .tabbertab h2 {
    display: none;
}

.tabberlive .tabbertab p,
.tabberlive .tabbertab p form {
    margin: 0;
    padding: 0;
}

/* ======================================================
   TOP SECTION (LOGO + SEARCH)
   ====================================================== */

.top-tab-logo {
    flex: 0 0 130px;
    width: 130px;
    text-align: center;
    display: block;
    height: auto;
    padding-top: 20px;
}

.top-tab-logo img {
    max-width: 90px;
}

img.google-logo {
    width: 60px;
}

.top-tab-search {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
	padding-top: 5px;
}

.top-tab-search form {
    margin: 0;
}

.top-tab-search input[type="text"] {
    font-size: 16px;
    padding: 7px;
    border: 1px solid #ccc;
    margin-top: 6px;
    -webkit-appearance: none;
}

.top-tab-search input[type="submit"] {
    font-size: 16px;
    padding: 5px 12px;
    border: 1px solid #ccc;
    background: #e0e0e0;
    cursor: pointer;
    -webkit-appearance: none;
}

/* ======================================================
   GOOGLE CSE
   ====================================================== */

.gsc-control-cse {
    background: none !important;
    border: none !important;
    padding: 6px 0 0 !important;
}

/* Size/position of Google search row */
.top-tab-search #___gcse_0,
.top-tab-search .gsc-control-cse,
.top-tab-search .gsc-control-wrapper-cse {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
}

.top-tab-search form.gsc-search-box,
.top-tab-search .gsc-search-box table {
    width: auto !important;
    table-layout: auto !important;
    margin: 0 !important;
}

/* Input column */
.top-tab-search td.gsc-input {
    width: auto !important;
    padding: 0 !important;
    vertical-align: middle !important;
}

/* Input wrapper */
.top-tab-search .gsc-input-box {
    width: 380px !important;
    height: 34px !important;
    border: 1px solid #ccc !important;
    border-right: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-sizing: border-box !important;
    padding: 0 8px !important;
}

/* Let input fill the whole field */
.top-tab-search .gsc-input-box table.gsc-input,
.top-tab-search .gsc-input-box table.gsc-input tbody,
.top-tab-search .gsc-input-box table.gsc-input tr,
.top-tab-search .gsc-input-box td.gsib_a {
    width: 100% !important;
}

.top-tab-search .gsc-input,
.top-tab-search input.gsc-input {
    width: 100% !important;
}

.top-tab-search input.gsc-input {
    height: 32px !important;
    line-height: 32px !important;
    font-size: 16px !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    background-image: none !important;
    -webkit-appearance: none !important;
}

/* Remove magnifier inside input, keep clear X */
.top-tab-search .gsc-input-box::before,
.top-tab-search .gsc-input-box::after,
.top-tab-search .gsib_a::before,
.top-tab-search .gsib_a::after {
    content: none !important;
    display: none !important;
    background-image: none !important;
}

.top-tab-search .gsib_a {
    background-image: none !important;
    padding-right: 0 !important;
	padding-left: 5px !important;
}

/* Keep clear X support visible */
.top-tab-search td.gsib_b {
    display: table-cell !important;
    width: 22px !important;
    padding: 0 6px 0 0 !important;
}

/* Button column + button */
.top-tab-search td.gsc-search-button {
    display: table-cell !important;
    width: auto !important;
    white-space: nowrap !important;
    padding: 0 !important;
    vertical-align: middle !important;
}

.top-tab-search .gsc-search-button-v2,
.top-tab-search .gsc-search-button input[type="submit"] {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 78px !important;
    min-width: 78px !important;
    height: 34px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #ccc !important;
    border-left: none !important;
    border-radius: 0 !important;
    background: #e0e0e0 !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
    color: #000 !important;
}

/* Replace icon button content with text */
.top-tab-search .gsc-search-button-v2 svg {
    display: none !important;
}

.top-tab-search .gsc-search-button-v2::after {
    content: "Sök";
    font-size: 16px;
    color: #000;
    line-height: 34px;
}

/* ======================================================
   RESPONSIVE
   ====================================================== */

@media screen and (max-width: 1100px) {
    .top-tab-logo {
        flex-basis: 110px;
        width: 110px;
    }

    .top-tab-logo img {
        max-width: 80px;
    }
}

@media screen and (max-width: 750px) {
    ul.tabbernav li a {
        line-height: 1.8em;
    }

    .tabberlive .tabbertab {
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding-top: 10px;
        padding-bottom: 20px;
    }

    .tabbertab-google {
        flex-direction: row;
        align-items: center;
    }

    .top-tab-logo {
        flex: 0 0 auto;
        width: 100%;
        text-align: center;
		padding-top: 5px;
    }

    .tabbertab-google .top-tab-logo {
        width: 100px;
    }

    .top-tab-logo img {
        margin: 5px !important;
        height: 20px;
    }

    .top-tab-search {
        text-align: center;
		padding-top: 0;
    }

    .top-tab-search .gsc-input-box {
        width: 230px !important;
    }

    img.google-logo {
        margin: 10px;
    }
}

/* Fix Google input text vertical alignment inside the larger box */
.top-tab-search .gsc-input-box {
    display: flex !important;
    align-items: center !important;
}

.top-tab-search .gsc-input-box table.gsc-input,
.top-tab-search .gsc-input-box tbody,
.top-tab-search .gsc-input-box tr,
.top-tab-search .gsc-input-box td.gsib_a {
    height: 100% !important;
    vertical-align: middle !important;
}

/* Keep wrapper border visible behind Google input */
.top-tab-search .gsc-input-box {
    background: #fff !important;
    border: 1px solid #ccc !important;
    border-right: none !important;
    height: 34px !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
}

.top-tab-search input.gsc-input {
    background: transparent !important;   /* was white */
    border: 0 !important;
    margin: 0 !important;
    height: 100% !important;
    line-height: 32px !important;
    padding: 0 !important;
    box-shadow: none !important;
}


.top-tab-search form.gsc-search-box, .top-tab-search .gsc-search-box table {
    display: inline-table;
}
