.companies-v2-page .companies-result-header {
    align-items: flex-end;
}

.companies-v2-note,
.companies-v2-filter-note {
    color: #7a879b;
    font-size: 11px;
    line-height: 1.8;
}

.companies-v2-note {
    margin: 6px 0 0;
}

.companies-v2-filter-note {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid #edf1f6;
}

.company-v2-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.company-v2-topline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.company-v2-heading-copy {
    min-width: 0;
}

.company-v2-meta,
.company-v2-types,
.company-v2-product-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.company-v2-meta {
    margin-top: 6px;
}

.company-v2-meta span,
.company-v2-types span {
    padding: 3px 8px;
    border: 1px solid #d8e4f0;
    border-radius: 999px;
    color: #48627e;
    background: #f7faff;
    font-size: 9px;
    line-height: 1.5;
}

.company-v2-meta .company-v2-meta-warning,
.company-v2-types .company-v2-tag-warning {
    border-color: #f0d7a6;
    color: #8a5a12;
    background: #fff8e9;
}

.company-v2-types {
    margin-top: -2px;
}

.company-v2-product-list {
    margin-top: 6px;
}

.company-v2-product-list span {
    padding: 4px 8px;
    border-radius: 8px;
    color: #24557f;
    background: #eaf4fd;
    font-size: 10px;
    line-height: 1.6;
}

.company-v2-locations {
    display: grid;
    gap: 8px;
    margin-top: 7px;
}

.company-v2-location {
    padding: 9px 10px;
    border: 1px solid #e3eaf2;
    border-radius: 9px;
    background: #fff;
}

.company-v2-location-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
}

.company-v2-location-type {
    color: #1768ba;
    font-size: 10px;
    font-weight: 800;
}

.company-v2-preferred {
    padding: 2px 7px;
    border-radius: 999px;
    color: #3d6e43;
    background: #eef8ef;
    font-size: 9px;
    font-weight: 800;
}

.company-v2-location b {
    display: block;
    margin-bottom: 2px;
    color: #244467;
    font-size: 11px;
    line-height: 1.7;
}

.company-v2-location p {
    margin: 2px 0 0;
    color: #66738b;
    font-size: 10px;
    line-height: 1.75;
}

.company-v2-reported-factory {
    margin-top: 9px;
    padding: 9px 10px;
    border: 1px solid #f0d7a6;
    border-radius: 9px;
    background: #fffaf0;
}

.company-v2-reported-factory strong,
.company-v2-reported-factory span,
.company-v2-reported-factory small {
    display: block;
}

.company-v2-reported-factory strong {
    color: #8a5a12;
    font-size: 10px;
}

.company-v2-reported-factory span {
    margin-top: 3px;
    color: #54482f;
    font-size: 11px;
    font-weight: 800;
}

.company-v2-reported-factory small {
    margin-top: 4px;
    color: #8a7959;
    font-size: 9px;
    line-height: 1.7;
}

.company-v2-details {
    border: 1px solid #e3eaf2;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.company-v2-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 11px;
    color: #244467;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.company-v2-details summary::-webkit-details-marker {
    display: none;
}

.company-v2-details summary span {
    min-width: 22px;
    padding: 2px 6px;
    border-radius: 999px;
    color: #52667d;
    background: #eef3f8;
    text-align: center;
    font-size: 9px;
}

.company-v2-details[open] summary {
    border-bottom: 1px solid #edf1f6;
}

.company-v2-detail-body {
    display: grid;
    gap: 7px;
    padding: 10px 11px;
}

.company-v2-detail-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    color: #66738b;
    font-size: 10px;
    line-height: 1.7;
}

.company-v2-detail-row b {
    color: #344a64;
    font-size: 10px;
}

.company-v2-capacity {
    padding: 8px 9px;
    border-radius: 8px;
    background: #f8fbff;
}

.company-v2-capacity > div {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px;
    color: #344a64;
}

.company-v2-capacity b {
    color: #08275d;
    font-size: 13px;
}

.company-v2-capacity span,
.company-v2-capacity small {
    font-size: 9px;
}

.company-v2-capacity small {
    display: block;
    margin-top: 4px;
    color: #66738b;
    line-height: 1.7;
}

.company-v2-muted-warning {
    color: #8a5a12 !important;
}

.company-v2-review {
    border-color: #f0d7a6;
    background: #fffdf8;
}

.company-v2-review summary {
    color: #8a5a12;
}

.company-v2-review-item {
    padding: 8px 9px;
    border-radius: 8px;
    color: #74572d;
    background: #fff8e9;
    font-size: 9px;
    line-height: 1.8;
}

.company-v2-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.company-v2-footer span {
    color: #9aa5b4;
    font-size: 9px;
    direction: ltr;
}

@media (max-width: 600px) {
    .companies-v2-page .companies-result-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .company-v2-detail-row {
        flex-direction: column;
        gap: 2px;
    }
}


/* Directory v2 tabs */
.directory-v2-tabs {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 22px;
    padding: 4px;
    border: 1px solid #dbe3ef;
    border-radius: 13px;
    background: #fff;
}

.directory-v2-tabs a {
    min-width: 150px;
    padding: 9px 16px;
    border-radius: 9px;
    color: #66738b;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.directory-v2-tabs a:hover {
    color: #1768ba;
    background: #f3f8fd;
}

.directory-v2-tabs a.is-active {
    color: #fff;
    background: #1768ba;
}

/* Iran steel map */
.directory-map-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.directory-map-overview > div {
    padding: 14px 16px;
    border: 1px solid #dbe3ef;
    border-radius: 13px;
    background: #fff;
}

.directory-map-overview strong,
.directory-map-overview span {
    display: block;
}

.directory-map-overview strong {
    color: #08275d;
    font-size: 16px;
}

.directory-map-overview span {
    margin-top: 3px;
    color: #7a879b;
    font-size: 10px;
}

.directory-map-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1.6fr)
        minmax(260px, .7fr);
    gap: 16px;
    align-items: start;
}

.directory-map-card,
.directory-map-sidebar {
    border: 1px solid #dbe3ef;
    border-radius: 18px;
    background: #fff;
    box-shadow:
        0 10px 30px rgba(6, 27, 69, .05);
}

.directory-map-card {
    padding: 18px;
}

.directory-map-card-head h2,
.directory-map-sidebar h2 {
    margin: 0;
    color: #061b45;
    font-size: 17px;
}

.directory-map-card-head p {
    margin: 5px 0 0;
    color: #7a879b;
    font-size: 10px;
    line-height: 1.8;
}

.directory-iran-map {
    margin-top: 12px;
    min-height: 420px;
    padding: 10px;
    border-radius: 14px;
    background: #f8fbff;
    overflow: hidden;
}

.directory-iran-map svg {
    display: block;
    width: 100% !important;
    height: auto;
    max-height: 560px;
    margin: 0 auto;
}

.directory-iran-map .province {
    cursor: pointer;
    outline: none;
}

.directory-iran-map
    .province
    .province-shape {
    transition:
        fill .15s ease,
        stroke .15s ease,
        filter .15s ease;
}

.directory-iran-map
    .province:hover
    .province-shape,
.directory-iran-map
    .province:focus
    .province-shape {
    fill: #bcdcf8 !important;
    stroke: #1768ba !important;
    filter:
        drop-shadow(
            0 2px 4px
            rgba(23, 104, 186, .18)
        );
}

.directory-iran-map
    .province.is-selected
    .province-shape {
    fill: #1768ba !important;
    stroke: #0d4f91 !important;
    filter:
        drop-shadow(
            0 3px 6px
            rgba(23, 104, 186, .25)
        );
}

.directory-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    color: #66738b;
    font-size: 10px;
}

.directory-map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.directory-map-legend-dot {
    width: 13px;
    height: 13px;
    border: 1px solid #9fb8d2;
    border-radius: 4px;
    background: #dfeaf5;
}

.directory-map-legend-dot.is-selected {
    border-color: #0d4f91;
    background: #1768ba;
}

.directory-map-sidebar {
    position: sticky;
    top: 92px;
    padding: 18px;
}

.directory-map-sidebar label {
    display: block;
    margin: 18px 0 6px;
    color: #344a64;
    font-size: 11px;
    font-weight: 800;
}

.directory-map-sidebar select {
    width: 100%;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #cfdbe9;
    border-radius: 10px;
    color: #102147;
    background: #f8fbff;
    font: inherit;
}

.directory-map-selection {
    margin-top: 14px;
    padding: 13px;
    border-radius: 11px;
    background: #edf6ff;
}

.directory-map-selection span,
.directory-map-selection strong,
.directory-map-selection small {
    display: block;
}

.directory-map-selection span {
    color: #66738b;
    font-size: 9px;
}

.directory-map-selection strong {
    margin-top: 3px;
    color: #08275d;
    font-size: 16px;
}

.directory-map-selection small {
    margin-top: 4px;
    color: #1768ba;
    font-size: 10px;
    font-weight: 800;
}

.directory-map-selection.is-empty {
    color: #66738b;
    background: #f6f8fb;
    font-size: 10px;
    line-height: 1.8;
}

.directory-map-method-note {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid #edf1f6;
    color: #7a879b;
    font-size: 9px;
    line-height: 1.9;
}

.directory-map-error {
    margin-top: 12px;
    padding: 30px 20px;
    border: 1px dashed #e0b9b9;
    border-radius: 12px;
    color: #9b4545;
    background: #fff8f8;
    text-align: center;
    font-size: 11px;
}

.directory-province-companies {
    margin-top: 24px;
}

.directory-province-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.directory-province-heading span {
    color: #7a879b;
    font-size: 10px;
}

.directory-province-heading h2 {
    margin: 2px 0 0;
    color: #061b45;
    font-size: 20px;
}

.directory-province-heading > strong {
    color: #1768ba;
    font-size: 12px;
}

.directory-company-accordion {
    display: grid;
    gap: 9px;
}

.directory-company-accordion-item {
    border: 1px solid #dbe3ef;
    border-radius: 13px;
    background: #fff;
    overflow: hidden;
}

.directory-company-accordion-item
    > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px;
    cursor: pointer;
    list-style: none;
}

.directory-company-accordion-item
    > summary::-webkit-details-marker {
    display: none;
}

.directory-company-accordion-item
    > summary
    > div:first-child {
    min-width: 0;
}

.directory-company-accordion-item
    > summary strong {
    display: block;
    color: #08275d;
    font-size: 12px;
}

.directory-company-accordion-item
    > summary span {
    color: #7a879b;
    font-size: 9px;
}

.directory-company-summary-meta {
    display: flex;
    align-items: center;
    gap: 9px;
}

.directory-company-summary-meta
    .is-warning {
    padding: 3px 7px;
    border-radius: 999px;
    color: #8a5a12;
    background: #fff3d8;
}

.directory-accordion-chevron {
    display: inline-block;
    color: #1768ba !important;
    font-size: 20px !important;
    line-height: 1;
    transition: transform .15s ease;
}

.directory-company-accordion-item[open]
    .directory-accordion-chevron {
    transform: rotate(-90deg);
}

.directory-company-accordion-body {
    padding: 0 15px 14px;
    border-top: 1px solid #edf1f6;
}

.directory-map-company-section {
    padding: 12px 0;
    border-bottom: 1px solid #edf1f6;
}

.directory-map-company-section:last-of-type {
    border-bottom: 0;
}

.directory-map-company-section > b {
    display: block;
    margin-bottom: 5px;
    color: #344a64;
    font-size: 10px;
}

.directory-map-company-section p {
    margin: 0;
    color: #66738b;
    font-size: 10px;
    line-height: 1.8;
}

.directory-map-company-locations {
    display: grid;
    gap: 6px;
}

.directory-map-company-locations > div {
    padding: 8px 9px;
    border-radius: 8px;
    background: #f8fbff;
}

.directory-map-company-locations strong,
.directory-map-company-locations span {
    display: block;
}

.directory-map-company-locations strong {
    color: #244467;
    font-size: 10px;
}

.directory-map-company-locations span {
    margin-top: 2px;
    color: #66738b;
    font-size: 9px;
    line-height: 1.7;
}

.directory-map-company-warning {
    padding: 8px 9px;
    border-radius: 8px;
    color: #8a5a12 !important;
    background: #fff8e9;
}

.directory-map-company-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
}

.directory-map-company-actions a {
    padding: 6px 10px;
    border: 1px solid #cfe0f1;
    border-radius: 8px;
    color: #1768ba;
    background: #f8fbff;
    font-size: 9px;
    font-weight: 800;
    text-decoration: none;
}

.directory-map-empty-selection {
    margin-top: 24px;
    padding: 34px 20px;
    border: 1px dashed #cfdbe9;
    border-radius: 16px;
    background: #fff;
    text-align: center;
}

.directory-map-empty-selection strong {
    display: block;
    color: #08275d;
    font-size: 15px;
}

.directory-map-empty-selection p {
    max-width: 500px;
    margin: 7px auto 0;
    color: #66738b;
    font-size: 10px;
    line-height: 1.9;
}

@media (max-width: 900px) {
    .directory-map-overview {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .directory-map-layout {
        grid-template-columns: 1fr;
    }

    .directory-map-sidebar {
        position: static;
    }
}

@media (max-width: 600px) {
    .directory-v2-tabs {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .directory-v2-tabs a {
        min-width: 0;
        padding-inline: 8px;
    }

    .directory-map-overview {
        grid-template-columns: 1fr 1fr;
    }

    .directory-map-overview > div {
        padding: 11px 12px;
    }

    .directory-iran-map {
        min-height: 300px;
        padding: 5px;
    }

    .directory-province-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .directory-company-accordion-item
        > summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .directory-company-summary-meta {
        width: 100%;
        justify-content: space-between;
    }
}


/* Map UI r2: full-width map + AJAX interaction */
.directory-map-layout {
    display: block;
}

.directory-map-card--full {
    width: 100%;
}

.directory-iran-map--wide {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 560px;
    padding: 14px 20px;
}

.directory-iran-map--wide svg {
    width: min(100%, 1040px) !important;
    max-width: 1040px;
    max-height: 760px;
}

.directory-map-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.directory-map-loading {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    color: #1768ba;
    background: #edf6ff;
    font-size: 9px;
    font-weight: 800;
}

.directory-iran-map.is-loading {
    opacity: .72;
    pointer-events: none;
}

[data-map-results] {
    transition: opacity .15s ease;
}

[data-map-results].is-loading {
    opacity: .55;
    pointer-events: none;
}

.directory-map-sidebar {
    display: none !important;
}

@media (max-width: 900px) {
    .directory-iran-map--wide {
        min-height: 460px;
        padding-inline: 8px;
    }

    .directory-iran-map--wide svg {
        width: min(100%, 860px) !important;
        max-height: 650px;
    }
}

@media (max-width: 600px) {
    .directory-map-card-head {
        flex-direction: column;
    }

    .directory-iran-map--wide {
        min-height: 330px;
        padding: 4px;
    }

    .directory-iran-map--wide svg {
        width: 100% !important;
        max-height: 480px;
    }
}


/* Directory v2 readability r3
   Improve company-card typography without changing data or layout logic. */

.company-v2-card {
    padding: 18px 18px 16px;
    gap: 14px;
}

.company-v2-heading-copy h3,
.company-v2-card .company-card-heading h3 {
    margin: 0;
    color: #08275d;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.65;
}

.company-v2-meta {
    margin-top: 8px;
    gap: 7px;
}

.company-v2-meta span,
.company-v2-types span {
    padding: 4px 9px;
    font-size: 10.5px;
    line-height: 1.6;
}

.company-v2-types {
    gap: 7px;
}

.company-v2-card .company-card-section {
    padding: 13px 14px;
}

.company-v2-card .company-card-section > strong {
    display: block;
    margin-bottom: 7px;
    color: #16395f;
    font-size: 12.5px;
    font-weight: 900;
    line-height: 1.7;
}

.company-v2-card .company-card-section p {
    margin-top: 4px;
    color: #5f6e82;
    font-size: 12.5px;
    line-height: 2;
}

.company-v2-product-list {
    gap: 7px;
    margin-top: 8px;
}

.company-v2-product-list span {
    padding: 5px 10px;
    font-size: 11px;
    line-height: 1.7;
}

.company-v2-locations {
    gap: 10px;
    margin-top: 9px;
}

.company-v2-location {
    padding: 12px 13px;
}

.company-v2-location-head {
    margin-bottom: 7px;
}

.company-v2-location-type {
    font-size: 11.5px;
    line-height: 1.7;
}

.company-v2-preferred {
    padding: 3px 8px;
    font-size: 10px;
}

.company-v2-location b {
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.8;
}

.company-v2-location p {
    margin-top: 3px;
    font-size: 11.5px;
    line-height: 1.9;
}

.company-v2-reported-factory {
    padding: 12px 13px;
}

.company-v2-reported-factory strong {
    font-size: 11.5px;
    line-height: 1.7;
}

.company-v2-reported-factory span {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.8;
}

.company-v2-reported-factory small {
    margin-top: 5px;
    font-size: 10.5px;
    line-height: 1.9;
}

.company-v2-details summary {
    min-height: 45px;
    padding: 11px 13px;
    font-size: 12px;
    line-height: 1.7;
}

.company-v2-details summary span {
    min-width: 25px;
    padding: 3px 7px;
    font-size: 10px;
}

.company-v2-detail-body {
    gap: 9px;
    padding: 12px 13px;
}

.company-v2-detail-row {
    gap: 14px;
    font-size: 11.5px;
    line-height: 1.9;
}

.company-v2-detail-row b {
    font-size: 11.5px;
    line-height: 1.8;
}

.company-v2-capacity {
    padding: 10px 11px;
}

.company-v2-capacity b {
    font-size: 14px;
}

.company-v2-capacity span,
.company-v2-capacity small {
    font-size: 10.5px;
}

.company-v2-capacity small {
    margin-top: 5px;
    line-height: 1.9;
}

.company-v2-review-item {
    padding: 10px 11px;
    font-size: 10.75px;
    line-height: 2;
}

.company-v2-footer {
    min-height: 34px;
}

.company-v2-footer a {
    font-size: 11.5px;
    font-weight: 800;
}

.company-v2-footer span {
    font-size: 10px;
}

/* Also improve accordion text under the Iran map. */
.directory-company-accordion-item > summary {
    padding: 15px 17px;
}

.directory-company-accordion-item > summary strong {
    font-size: 13px;
    line-height: 1.8;
}

.directory-company-accordion-item > summary span {
    font-size: 10.5px;
    line-height: 1.7;
}

.directory-map-company-section > b {
    margin-bottom: 7px;
    font-size: 11.5px;
}

.directory-map-company-section p {
    font-size: 11.5px;
    line-height: 1.95;
}

.directory-map-company-locations strong {
    font-size: 11.5px;
}

.directory-map-company-locations span {
    margin-top: 3px;
    font-size: 10.75px;
    line-height: 1.9;
}

.directory-map-company-actions a {
    padding: 7px 11px;
    font-size: 10.5px;
}

/* Desktop: give cards a little more visual breathing room. */
@media (min-width: 901px) {
    .company-v2-card {
        min-height: 100%;
    }
}

/* Mobile: keep the larger typography, but slightly reduce title size. */
@media (max-width: 600px) {
    .company-v2-card {
        padding: 15px 14px;
    }

    .company-v2-heading-copy h3,
    .company-v2-card .company-card-heading h3 {
        font-size: 15.5px;
    }

    .company-v2-card .company-card-section p,
    .company-v2-detail-row,
    .directory-map-company-section p {
        font-size: 11.5px;
    }
}

/* Iran map province labels */
.directory-iran-map #iran-provinces-map .province-label,
.directory-iran-map #iran-provinces-map .province-label tspan {
    font-weight: 400 !important;
}
