/* ============================================================
   jrats-companies-list.css — [jr_companies_list]
   Public Companies Directory grouped by country.
   Brand: #5277ba
   ============================================================ */

.jrats-cld {
    max-width: 1100px;
    margin: 0 auto;
    font-family: inherit;
    color: #26314b;
}

/* ---------------- Empty state ---------------- */
.jrats-cld-empty {
    text-align: center;
    padding: 56px 20px;
    background: #f7f9fd;
    border: 1px dashed #c9d6ec;
    border-radius: 12px;
}
.jrats-cld-empty-ic {
    font-size: 34px;
    display: block;
    margin-bottom: 10px;
}
.jrats-cld-empty p {
    margin: 0;
    font-size: 16px;
    color: #5a6785;
}

/* ---------------- Country accordion ---------------- */
.jrats-cld-countries {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.jrats-cld-country {
    border: 1px solid #e1e8f5;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.jrats-cld-country-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    font-size: 17px;
    font-weight: 600;
    color: #26314b;
    background: #fff;
    transition: background-color 0.15s ease;
}
.jrats-cld-country-head::-webkit-details-marker {
    display: none;
}
.jrats-cld-country-head:hover {
    background: #f4f7fc;
}
.jrats-cld-country[open] > .jrats-cld-country-head {
    border-bottom: 1px solid #e1e8f5;
    background: #f4f7fc;
}

.jrats-cld-country-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}
.jrats-cld-country-ic {
    font-size: 18px;
}

.jrats-cld-country-count {
    flex: 0 0 auto;
    min-width: 34px;
    padding: 3px 11px;
    border-radius: 999px;
    background: #5277ba;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
}

.jrats-cld-chevron {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-right: 2px solid #5277ba;
    border-bottom: 2px solid #5277ba;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
    margin-left: 2px;
}
.jrats-cld-country[open] > .jrats-cld-country-head .jrats-cld-chevron {
    transform: rotate(-135deg);
}

/* ---------------- Cards grid ---------------- */
.jrats-cld-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 18px 20px 20px;
    background: #fbfcfe;
}

.jrats-cld-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
    border: 1px solid #e1e8f5;
    border-radius: 10px;
    padding: 16px;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.jrats-cld-card:hover {
    border-color: #b9c9e8;
    box-shadow: 0 6px 18px rgba(82, 119, 186, 0.14);
    transform: translateY(-2px);
}

.jrats-cld-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.jrats-cld-logo {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e1e8f5;
    background: #f4f7fc;
    display: flex;
    align-items: center;
    justify-content: center;
}
.jrats-cld-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.jrats-cld-logo-ph {
    font-size: 20px;
    font-weight: 700;
    color: #5277ba;
}

.jrats-cld-idbox {
    min-width: 0;
}
.jrats-cld-name {
    margin: 0 0 2px;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.jrats-cld-name a {
    color: #26314b;
    text-decoration: none;
}
.jrats-cld-name a:hover,
.jrats-cld-name a:focus {
    color: #5277ba;
    text-decoration: underline;
}
.jrats-cld-loc {
    margin: 0;
    font-size: 13px;
    color: #5a6785;
}

.jrats-cld-excerpt {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: #445070;
}

.jrats-cld-actions {
    margin-top: auto;
    padding-top: 4px;
}
.jrats-cld-view {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 8px;
    background: #5277ba;
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.jrats-cld-view:hover,
.jrats-cld-view:focus {
    background: #40639f;
    color: #fff;
    box-shadow: 0 3px 10px rgba(82, 119, 186, 0.35);
    text-decoration: none;
}
.jrats-cld-view:focus-visible {
    outline: 2px solid #5277ba;
    outline-offset: 2px;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 640px) {
    .jrats-cld-grid {
        grid-template-columns: 1fr;
        padding: 14px 14px 16px;
    }
    .jrats-cld-country-head {
        padding: 14px 14px;
        font-size: 16px;
    }
}

/* ---------------- Live filter (jrats-companies-list.js) ---------------- */
.jrats-cld-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    padding: 4px 14px;
    background: #fff;
    border: 1px solid #e1e8f5;
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.jrats-cld-filter:focus-within {
    border-color: #5277ba;
    box-shadow: 0 0 0 3px rgba(82, 119, 186, 0.15);
}
.jrats-cld-filter-ic {
    flex: 0 0 auto;
    font-size: 15px;
    color: #5a6785;
}
.jrats-cld-filter-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 10px 0;
    font-size: 15px;
    color: #26314b;
    font-family: inherit;
}
.jrats-cld-filter-input::placeholder {
    color: #93a1bd;
}

/* Filter visibility states */
.jrats-cld-card.is-hidden,
.jrats-cld-country.is-hidden {
    display: none;
}

/* No-results message */
.jrats-cld-noresults {
    text-align: center;
    padding: 36px 20px;
    background: #f7f9fd;
    border: 1px dashed #c9d6ec;
    border-radius: 12px;
    margin-top: 14px;
}
.jrats-cld-noresults p {
    margin: 0;
    font-size: 15px;
    color: #5a6785;
}

/* Theme-proof [hidden]: the theme overrides the UA hidden rule. */
.jrats-cld [hidden] {
    display: none !important;
}

/* ============================================================
   Countries mode ([jr_companies_list] default) - homepage widget
   ============================================================ */
.jrats-clc {
    max-width: 1100px;
    margin: 0 auto;
    font-family: inherit;
}

.jrats-clc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
    align-items: start;
}

/* Country card: header link + city rows underneath */
.jrats-clc-country {
    background: #fff;
    border: 1px solid #e1e8f5;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.jrats-clc-country:hover {
    border-color: #b9c9e8;
    box-shadow: 0 6px 18px rgba(82, 119, 186, 0.14);
}

.jrats-clc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    background: #f4f7fc;
    border-bottom: 1px solid #e1e8f5;
    text-decoration: none;
}
.jrats-clc-head:hover,
.jrats-clc-head:focus {
    background: #e9f0fb;
    text-decoration: none;
}

.jrats-clc-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
    color: #26314b;
    overflow-wrap: anywhere;
}
.jrats-clc-ic {
    font-size: 15px;
}
.jrats-clc-head:hover .jrats-clc-name {
    color: #5277ba;
}

.jrats-clc-count {
    flex: 0 0 auto;
    padding: 4px 12px;
    border-radius: 999px;
    background: #5277ba;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

/* City rows */
.jrats-clc-cities {
    display: flex;
    flex-direction: column;
    padding: 6px 8px;
}
.jrats-clc-city {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.15s ease;
}
.jrats-clc-city:hover,
.jrats-clc-city:focus {
    background: #f4f7fc;
    text-decoration: none;
}
.jrats-clc-city-name {
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    color: #445070;
    overflow-wrap: anywhere;
}
.jrats-clc-city:hover .jrats-clc-city-name {
    color: #5277ba;
}
.jrats-clc-city-count {
    flex: 0 0 auto;
    min-width: 30px;
    text-align: center;
    padding: 2px 9px;
    border-radius: 999px;
    background: #eef3fb;
    color: #5277ba;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.jrats-clc-empty {
    text-align: center;
    padding: 36px 20px;
    background: #f7f9fd;
    border: 1px dashed #c9d6ec;
    border-radius: 12px;
}
.jrats-clc-empty p {
    margin: 0;
    font-size: 15px;
    color: #5a6785;
}

@media (max-width: 640px) {
    .jrats-clc-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .jrats-clc-head {
        padding: 13px 14px;
    }
}

/* Flat item variant (industries widget and future flat lists) */
.jrats-clc-grid-flat {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.jrats-clc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    background: #fff;
    border: 1px solid #e1e8f5;
    border-radius: 11px;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.jrats-clc-item:hover,
.jrats-clc-item:focus {
    border-color: #5277ba;
    box-shadow: 0 6px 18px rgba(82, 119, 186, 0.16);
    transform: translateY(-2px);
    text-decoration: none;
}
.jrats-clc-item:hover .jrats-clc-name {
    color: #5277ba;
}

@media (max-width: 640px) {
    .jrats-clc-grid-flat {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .jrats-clc-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 13px 14px;
    }
}
