/* =============================================================
   showCompaniesOnMaps.css
   Self-contained styles for [show_companies_maps] and
   [show_companies_maps_rev]. No external plugin CSS required.
   ============================================================= */

/* ---- Utilities ---- */
.hidden {
    display: none !important;
}

/* ---- Filter / search bar ---- */
.iasme_results_section {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-column-gap: 10px;
    padding-bottom: 1vh;
}

.iasme_select {
    width: 100%;
}

.iasme_select select {
    border: 2px solid black;
    border-radius: 12px;
    width: 100%;
    font-size: x-large;
    font-weight: bold;
    color: #205055;
}

div#iasme_company_input {
    width: 100%;
    display: flex;
    background: white;
    border: 2px solid black;
    border-radius: 12px;
    padding-left: 7px;
}

span#searchLogo {
    display: inline-flex;
    align-items: center;
    width: 30px;
}

input#search {
    border-radius: 12px;
    width: 100%;
    border: none;
    font-size: x-large;
    font-weight: bold;
    color: #205055;
}

input#search::placeholder {
    font-size: x-large;
    font-weight: bold;
    color: #205055;
}

#iasme_alphabet_select {
    display: none;
}

.dirPageBox1 { grid-column: 1; }
.dirPageBox2 { grid-column: 2; }

/* ---- Certification multi-select dropdown ---- */
.multipleSelect {
    width: 100%;
}

.selectBox {
    position: relative;
}

.selectionBox {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
}

#multipleCheckbox {
    border-radius: 0 0 12px 12px;
    display: none;
    position: absolute;
    border: 2px solid;
    z-index: 1;
    width: 30%;
    background: white;
}

#multipleCheckbox label {
    display: block;
}

#multipleCheckbox label:hover {
    background-color: var(--iot-primary);
    color: white;
}

/* ---- Active filter tags ---- */
.checkboxFilter {
    padding-bottom: 3vh;
}

.tags-input {
    display: inline-block;
    position: relative;
    padding: 5px;
}

.tags-input ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tags-input li {
    display: inline-block;
    border-radius: 20px;
    padding: 5px 10px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.tags-input .delete-button {
    background-color: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    margin-left: 5px;
}

button.delete-button {
    background: white;
    color: var(--iot-primary);
    border-radius: 50px;
}

span.filterTag {
    padding: 4px;
    margin-right: 4px;
    border-radius: 12px;
}

li.location, li.letter, li.certification, li.company {
    background: var(--iot-primary);
    color: white;
}

/* ---- View tabs (Map | List) — matches the approved find-a-CB tab style ---- */
.scm-view-tabs {
    --scm-tab-plum: #4a2140;
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #e2e2e2;
}

.scm-tab {
    border: none;
    background: transparent;
    color: var(--scm-tab-plum);
    border-radius: 12px 12px 0 0;
    padding: 14px 32px;
    font-size: 1.15em;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.scm-tab.is-active {
    background: var(--scm-tab-plum);
    color: white;
}

.scm-tab:hover:not(.is-active) {
    background: rgba(74, 33, 64, 0.08);
}

/* ---- List view: render the (card-grid) results table as a plain table ----
   Selectors are #id-scoped so they decisively beat the card rules below
   (e.g. table.dataTable tbody tr { min-height: 10vh } and td { border: 0 }). */
table#show_cb_results_table.scm-list-active {
    display: table;
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

#show_cb_results_table.scm-list-active thead {
    display: table-header-group;
}

#show_cb_results_table.scm-list-active thead th {
    text-align: left;
    padding: 10px 16px;
    color: #4a2140;
    font-size: 1.05em;
    border-bottom: 2px solid #4a2140;
}

#show_cb_results_table.scm-list-active tbody {
    display: table-row-group;
    grid-template-columns: none;
    gap: 0;
}

#show_cb_results_table.scm-list-active tbody tr {
    display: table-row;
    box-shadow: none;
    border: 0;
    border-radius: 0;
    min-height: 0;
    cursor: default;
}

#show_cb_results_table.scm-list-active tbody tr:nth-child(even) td {
    background: #f6f8f8 !important;
}

#show_cb_results_table.scm-list-active tbody td {
    display: table-cell;
    padding: 14px 16px;
    margin: 0;
    vertical-align: middle;
    text-align: left;
    border: 0;
    border-bottom: 1px solid #e5e9e9;
    align-self: auto;
}

#show_cb_results_table.scm-list-active td.companyName {
    font-weight: 700;
    color: #4a2140;
    font-size: 1em;
}

#show_cb_results_table.scm-list-active a.scm-show-on-map {
    color: #4a2140;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

#show_cb_results_table.scm-list-active a.scm-show-on-map:hover {
    text-decoration: underline;
}

#show_cb_results_table.scm-list-active .scheme-icon {
    display: inline-block;
    margin: 2px 4px 2px 0;
    padding: 4px 12px;
    border-radius: 14px;
    background-color: var(--dcc-primary, #4a2140);
    color: white;
    font-size: 0.85em;
    white-space: nowrap;
}

#show_cb_results_table.scm-list-active a.scm-list-link {
    color: #4a2140;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 600px) {
    #show_cb_results_table.scm-list-active thead { display: none; }
    #show_cb_results_table.scm-list-active tbody td { padding: 8px 10px; }
}

/* ---- Map canvas ---- */
.scm-map-wrap {
    position: relative;
    margin-bottom: 16px;
}

#iasme-map-canvas {
    width: 100%;
    height: 600px;
    border-radius: 12px;
}

#scm-no-results-overlay {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.scm-no-results-message {
    background: #fff;
    border-radius: 12px;
    padding: 28px 36px;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    pointer-events: all;
}

.scm-no-results-message i {
    font-size: 2.4em;
    color: var(--dcc-primary, #c00);
    margin: 0 auto 10px;
    display: block;
    text-align: center;
}

.scm-no-results-message p {
    margin: 4px 0;
    font-size: 1em;
    color: #333;
}

/* ---- Custom map zoom controls ---- */
.scm-zoom-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 10px 10px 0;
}

.scm-zoom-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: white;
    color: #444;
    font-size: 1em;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scm-zoom-btn:hover {
    background: var(--dcc-primary);
    color: white;
}

/* ---- DataTable wrapper ---- */
div.dataTables_wrapper {
    padding: 2.5% 5% !important;
    background: white;
    border-radius: 25px;
}

div#show_cb_results_table_filter {
    display: none;
}

/* ---- Results table ---- */
#show_cb_results_table {
    width: 100%;
}

.cards tbody tr {
    border: 0 !important;
    background: white !important;
    box-shadow: 0px 2px 2px black;
    border-radius: 12px;
}

table.dataTable tbody tr {
    cursor: pointer;
    background-color: white !important;
    min-height: 10vh;
}

table.dataTable tbody tr td {
    align-self: center;
    border: 0;
}

tbody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

td.companyName, td.address, td.CTA {
    margin-left: 15px;
    text-align: left;
}

td.companyName.all {
    color: var(--iot-primary);
    font-size: x-large;
    font-weight: 600;
}

td.URL.all a {
    font-size: x-large;
}

.logo {
    text-align: center;
}

td.logo {
    width: 80%;
}

img.partnerLogo {
    max-height: 50px;
    width: auto;
}

img.partnerLogo.defaultLogo {
    height: 80px;
    width: auto;
}

/* ---- Scheme icons (lozenges) ---- */
.scheme-icon {
    padding: 2px 10px;
    border-radius: 25px;
    font-weight: bold;
}

.scheme-ce      { background-color: var(--lozenge-ce-bg);       color: var(--lozenge-ce-txt); }
.scheme-ceplus  { background-color: var(--lozenge-ceplus-bg);   color: var(--lozenge-ceplus-txt); }
.scheme-ca      { background-color: var(--lozenge-advisor-bg);  color: var(--lozenge-advisor-txt); }
.scheme-ica     { background-color: var(--lozenge-ica-bg);      color: var(--lozenge-ica-txt); }
.scheme-icb     { background-color: var(--lozenge-icb-bg);      color: var(--lozenge-icb-txt); }
.scheme-iot     { background-color: var(--lozenge-iot-bg);      color: var(--lozenge-iot-txt); }
.scheme-maritime { background-color: var(--lozenge-maritime-bg); color: var(--lozenge-maritime-txt); }

/* ---- Company detail panel ---- */
div#cbCompanyResultsContainer {
    display: flex;
    background: white;
    border-radius: 25px;
    padding: 3% 10%;
    justify-content: center;
}

div#companyDetails {
    display: inline-grid;
    border-radius: 25px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 500;
    margin-left: 30px;
}

.orgOverview {
    padding-bottom: 3vh;
}

.orgOverview h2 {
    color: #E46919;
    font-size: xx-large !important;
}

.orgServices h3, .orglocations h3 {
    font-weight: 700;
}

.orgServices, .orglocations {
    grid-column: 1;
}

.logoInfo {
    grid-column: 2;
    grid-row: 1 / 2 span;
    display: grid;
    align-items: center;
    justify-content: center;
}

span#logoInformation img {
    max-height: 100% !important;
    width: auto;
}

.webInfo {
    display: grid;
    align-content: end;
    justify-content: center;
    grid-column: 2;
    grid-row: 3;
}

.closeButton {
    position: absolute;
    left: 0;
    margin-left: 20px;
    cursor: pointer;
}

a.button.companyInfo {
    font-size: large;
    color: white;
    background: #E46919;
    border-radius: 25px;
    padding: 5px 3vw;
}

a.button.CTA {
    font-size: xx-large;
    color: #E46919;
}

i.fa-solid.fa-arrow-right, i.fa-solid.fa-arrow-left {
    font-size: xxx-large;
    color: #E46919;
}

/* ---- Google Maps info window ---- */
.infoContainer {
    display: flex;
    flex-flow: row wrap;
    padding-top: 5px;
    overflow: hidden;
    gap: 4px 8px;
    max-width: 260px;
    font-size: medium;
}

.infoContainer .marker {
    display: none;
}

.infoContainer .address {
    flex: 1 1 100%;
}

.infoContainer .schemes {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.infoContainer .scheme-icon {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
}

.infoContainer .scheme-dcc-level-0,
.infoContainer .scheme-dcc-level-1,
.infoContainer .scheme-dcc-level-2,
.infoContainer .scheme-dcc-level-3 {
    background-color: var(--dcc-primary);
    color: white;
}

/* Company name in info window header */
.cbHeader {
    font-size: 1.2em;
    font-weight: 800;
}

.cbHeaderIcon {
    font-size: 0.9em;
    opacity: 0.7;
    margin-right: 5px;
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
    .iasme_select select, input#search, input#search::placeholder {
        font-size: large;
    }
}

@media (max-width: 900px) {
    .iasme_select select, input#search, input#search::placeholder {
        font-size: medium;
    }

    .iasme_results_section {
        display: inline-grid;
        padding-bottom: 3vh;
        width: 95%;
        padding-left: 2.5%;
    }

    .dirPageBox1, .dirPageBox2 {
        padding-left: 0;
        padding-bottom: 20px;
    }

    .dirPageBox3 {
        padding-top: 20px;
    }
}

@media (max-width: 600px) {
    .iasme_results_section {
        display: inline-grid;
        grid-template-columns: repeat(1, minmax(0, 1fr));
        grid-column-gap: 10px;
        padding-bottom: 3vh;
    }

    #multipleCheckbox {
        width: 90%;
    }

    #iasme_alphabet_select {
        display: inline;
    }

    .checkboxFilter {
        padding-bottom: 3vh;
        display: flex;
        margin-left: 20px;
    }

    .dirPageBox1 { grid-row: 1; grid-column: 1; width: 100%; }
    .dirPageBox2 { grid-row: 2; grid-column: 1; width: 100%; }
    .dirPageBox3 { grid-row: 4; grid-column: 1; width: 100%; }

    #iasme_company_input { grid-row: 3; grid-column: 1; width: 100%; }

    tbody {
        grid-template-columns: 1fr;
    }

    div#companyDetails {
        grid-template-columns: 1fr;
        margin-left: 0;
    }

    .orgOverview {
        padding-top: 100px;
    }

    .webInfo {
        grid-column: 1;
        grid-row: 6;
        padding-top: 30px;
    }

    .logoInfo {
        grid-column: 1;
        grid-row: 2;
        padding-bottom: 10px;
    }

    td.companyName.all {
        width: 100%;
        padding: 0;
    }
}
