/* Base container styles */
.dashboard-container {
    display: flex;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-height: 600px;
    position: relative;
}

/* Hide radio inputs but keep them accessible */
.dashboard-container .tab-input {
    display: none;
}

/* Tab Navigation Structure */
.dashboard-tabs {
    width: 190px;
    background: #f8f9fa;
    padding: 10px 0;
    border-radius: 12px 0 0 12px;
}

/* Tab Button Styles */
.dashboard-tabs .tab {
    display: flex;
    align-items: center;
    padding: 10px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px 15px;
    border-radius: 8px;
    font-size: 15px;
}

.dashboard-tabs .tab:hover {
    background: #e9ecef;
}

/* Active tab styles */
.dashboard-container input[id="tab-overview"]:checked~.dashboard-tabs label[for="tab-overview"],
.dashboard-container input[id="tab-hr"]:checked~.dashboard-tabs label[for="tab-hr"],
.dashboard-container input[id="tab-licenses"]:checked~.dashboard-tabs label[for="tab-licenses"],
.dashboard-container input[id="tab-online_presence"]:checked~.dashboard-tabs label[for="tab-online_presence"],
.dashboard-container input[id="tab-certifications"]:checked~.dashboard-tabs label[for="tab-certifications"],
.dashboard-container input[id="tab-registrations"]:checked~.dashboard-tabs label[for="tab-registrations"],
.dashboard-container input[id="tab-awards"]:checked~.dashboard-tabs label[for="tab-awards"],
.dashboard-container input[id="tab-activities"]:checked~.dashboard-tabs label[for="tab-activities"],
.dashboard-container input[id="tab-competitors"]:checked~.dashboard-tabs label[for="tab-competitors"],
.dashboard-container input[id="tab-financial"]:checked~.dashboard-tabs label[for="tab-financial"],
.dashboard-container input[id="tab-contact"]:checked~.dashboard-tabs label[for="tab-contact"],
.dashboard-container input[id="tab-stock_info"]:checked~.dashboard-tabs label[for="tab-stock_info"],
.dashboard-container input[id="tab-branches"]:checked~.dashboard-tabs label[for="tab-branches"],
.dashboard-container input[id="tab-affiliation"]:checked~.dashboard-tabs label[for="tab-affiliation"],
.dashboard-container input[id="tab-executives"]:checked~.dashboard-tabs label[for="tab-executives"],
.dashboard-container input[id="tab-shareholders"]:checked~.dashboard-tabs label[for="tab-shareholders"],
.dashboard-container input[id="tab-ip_info"]:checked~.dashboard-tabs label[for="tab-ip_info"] {
    background: #0066cc;
    color: #fff;
}

/* Show tab contents when corresponding radio is checked */
.dashboard-container input[id="tab-overview"]:checked~.dashboard-content #overview,
.dashboard-container input[id="tab-hr"]:checked~.dashboard-content #hr,
.dashboard-container input[id="tab-licenses"]:checked~.dashboard-content #licenses,
.dashboard-container input[id="tab-online_presence"]:checked~.dashboard-content #online_presence,
.dashboard-container input[id="tab-certifications"]:checked~.dashboard-content #certifications,
.dashboard-container input[id="tab-registrations"]:checked~.dashboard-content #registrations,
.dashboard-container input[id="tab-awards"]:checked~.dashboard-content #awards,
.dashboard-container input[id="tab-activities"]:checked~.dashboard-content #activities,
.dashboard-container input[id="tab-competitors"]:checked~.dashboard-content #competitors,
.dashboard-container input[id="tab-financial"]:checked~.dashboard-content #financial,
.dashboard-container input[id="tab-contact"]:checked~.dashboard-content #contact,
.dashboard-container input[id="tab-stock_info"]:checked~.dashboard-content #stock_info,
.dashboard-container input[id="tab-branches"]:checked~.dashboard-content #branches,
.dashboard-container input[id="tab-affiliation"]:checked~.dashboard-content #affiliation,
.dashboard-container input[id="tab-executives"]:checked~.dashboard-content #executives,
.dashboard-container input[id="tab-shareholders"]:checked~.dashboard-content #shareholders,
.dashboard-container input[id="tab-ip_info"]:checked~.dashboard-content #ip_info {
    display: block;
}

/* Hide overview when other tabs are selected */
.dashboard-container input[id="tab-hr"]:checked~.dashboard-content #overview,
.dashboard-container input[id="tab-licenses"]:checked~.dashboard-content #overview,
.dashboard-container input[id="tab-online_presence"]:checked~.dashboard-content #overview,
.dashboard-container input[id="tab-certifications"]:checked~.dashboard-content #overview,
.dashboard-container input[id="tab-registrations"]:checked~.dashboard-content #overview,
.dashboard-container input[id="tab-awards"]:checked~.dashboard-content #overview,
.dashboard-container input[id="tab-activities"]:checked~.dashboard-content #overview,
.dashboard-container input[id="tab-competitors"]:checked~.dashboard-content #overview,
.dashboard-container input[id="tab-financial"]:checked~.dashboard-content #overview,
.dashboard-container input[id="tab-contact"]:checked~.dashboard-content #overview,
.dashboard-container input[id="tab-stock_info"]:checked~.dashboard-content #overview,
.dashboard-container input[id="tab-branches"]:checked~.dashboard-content #overview,
.dashboard-container input[id="tab-affiliation"]:checked~.dashboard-content #overview,
.dashboard-container input[id="tab-executives"]:checked~.dashboard-content #overview,
.dashboard-container input[id="tab-shareholders"]:checked~.dashboard-content #overview,
.dashboard-container input[id="tab-ip_info"]:checked~.dashboard-content #overview {
    display: none;
}

.tab i {
    width: 20px;
    margin-right: 12px;
    text-align: center;
}

/* Content Area */
.dashboard-content {
    flex: 1;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 0 12px 12px 0;
}

/* Hide all tab contents by default */
.dashboard-content .tab-content {
    display: none;
}

/* Base Container Styles */
.company-dashboard {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0px;
    font-family: 'Segoe UI', sans-serif;
}

/* Header Styles */
.company-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.company-logo img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    margin-right: 20px;
}

.company-title {
    flex: 1;
}

.company-name {
    margin-bottom: 3px;
}

.company-name h1 {
    margin: 0;
    font-size: 24px;
    color: #333;
    line-height: 1.2;
    font-weight: 500;
}

.company-name-en {
    display: block;
    color: #666;
    font-size: 24px;
    margin-top: 3px;
}

.company-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.registration-numbers {
    display: flex;
    gap: 25px;
    color: #666;
    flex-wrap: wrap;
}

.reg-item {
    white-space: nowrap;
    font-size: 16px;
    font-weight: 500;
    background-color: #0066cc21;
    padding-right: 10px;
    padding-left: 10px;
    border-radius: 20px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-left: auto;
}

.status-badge.active {
    background-color: #e8f5e9;
    color: #2e7d32;
}

/* Dashboard Container and Tabs Structure */
.dashboard-container {
    display: flex;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-height: 600px;
}

/* Basic Info Card Styles */
.basic-info-card {
    margin-bottom: 30px;
}

.info-grid {
    display: grid;
    gap: 15px;
}

.info-row {
    display: grid;
    grid-template-columns: 245px 1fr;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.info-label {
    color: #666;
    font-weight: 500;
    margin-bottom: 5px;
}

.info-value {
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.multi-lang {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.multi-lang .secondary {
    color: #666;
    font-size: 0.9em;
}

/* Metrics Grid Styles */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    position: relative;
    background: #eee;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 16px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.metric-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background-color: #0066cc;
    border-radius: 0 0 8px 8px;
    transition: background-color 0.3s;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.metric-card:hover::after {
    background-color: #ff6600;
}

.metric-card h3 {
    font-size: 16px;
    margin: 0 0 8px;
    color: #333;
    font-weight: 600;
}

.metric-value {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 0;
}

.metric-subtext {
    font-size: 16px;
    color: #0066cc;
    margin-top: 4px;
}

/* Section Styles */
.section {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    margin-bottom: 10px;
}

.section h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    font-weight: 700;
}

.chart-container h2 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* Online Presence Styles */
#online_presence .info-value a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
    word-break: break-all;
}

#online_presence .info-value a:hover {
    color: #004999;
    text-decoration: underline;
}

/* WHOIS Information Styles */
.whois-section {
    margin-top: 20px;
}

.whois-section h2 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.whois-section table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.whois-section td,
.whois-section th {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.whois-section th {
    text-align: left;
    color: #666;
    width: 200px;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
}

.salary-info .info-value {
    display: flex;
    gap: 20px;
    align-items: center;
}

.salary-info .annual-salary,
.salary-info .monthly-salary {
    white-space: nowrap;
}

.license-section,
.cert-section {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px 20px 5px;
    /* top/right-left/bottom */
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.license-section h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f7;
}

.license-section .info-value {
    justify-content: flex-start;
}

.no-license-message {
    padding: 20px;
    background: #f8fafc;
    border-radius: 6px;
    color: #64748b;
}

.certification-section {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.certification-section h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f7;
}

.no-certification-message {
    padding: 20px;
    background: #f8fafc;
    border-radius: 6px;
    color: #64748b;
}

.financial-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.financial-table th,
.financial-table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: right;
}

.financial-table th:first-child,
.financial-table td:first-child {
    text-align: left;
}

.financial-table thead {
    background: #f2f2f2;
}


.license-section.mail-order .info-row-3col .col {
    /* your Mail-Order-only styles here */
    border-bottom: none;
}


.license-section.mail-order .info-row-3col .info-label {
    border-bottom: 1px solid #eee;
}

.license-section.door2door .info-row-3col .col {
    /* your Mail-Order-only styles here */
    border-bottom: none;
}

.license-section.door2door .info-row-3col .info-label {
    border-bottom: 1px solid #eee;
}

.license-section.telemarketing .info-row-3col .col {
    /* your Mail-Order-only styles here */
    border-bottom: none;
}

.license-section.telemarketing .info-row-3col .info-label {
    border-bottom: 1px solid #eee;
}

.license-section.prepaid .info-row-3col .col {
    /* your Mail-Order-only styles here */
    border-bottom: none;
}

.license-section.prepaid .info-row-3col .info-label {
    border-bottom: 1px solid #eee;
}

/* Table styling */
.door2door-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.door2door-table th,
.door2door-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.door2door-table th {
    background: #f7f7f7;
}

.door2door-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Container for licenses rows */
.licenses-row {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.licenses-type {
    flex: 0 0 200px;
    font-weight: bold;
    padding-right: 10px;
    border-right: 1px solid #ddd;
}

.licenses-details {
    flex: 1;
    padding-left: 10px;
}

.detail-row {
    margin-bottom: 5px;
}

.detail-label {
    display: inline-block;
    width: 170px;
    /* adjust as needed */
    font-weight: bold;
}

.detail-value {
    display: inline-block;
}

.licenses-more {
    margin-left: 10px;
    align-self: center;
}

/* Global button style for license page buttons */
.global-license-button {
    display: inline-block;
    background-color: #0066cc;
    /* Primary blue color */
    color: #fff;
    padding: 8px 8px;
    font-size: 11px;
    border: none;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.global-license-button:hover {
    background-color: #004c99;
    color: #fff;
}

/* Certification Summary Header & Rows (Flex Layout) */
.certification-summary-header,
.certification-summary {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.certification-summary-header {
    font-weight: bold;
    background-color: #f7f7f7;
}

/* Column styling with fixed widths */
.certification-col {
    padding: 0 10px;
}

.col-flag {
    flex: 0 0 200px;
    font-weight: 500;
}

/* Stays regular */
.col-type {
    flex: 0 0 200px;
}

.col-industry {
    flex: 0 0 250px;
}

.col-published {
    flex: 0 0 150px;
}

.col-expiration {
    flex: 0 0 120px;
}

.col-more {
    flex: 0 0 120px;
    text-align: right;
}

/* When no certification data exists, color detail columns light gray 
   (apply to header and summary rows) */
.certification-summary.no-data,
.certification-summary.no-data .col-type,
.certification-summary.no-data .col-industry,
.certification-summary.no-data .col-published,
.certification-summary.no-data .col-expiration,
.certification-summary-header.no-data .col-type,
.certification-summary-header.no-data .col-industry,
.certification-summary-header.no-data .col-purpose,
.certification-summary-header.no-data .col-certnum,
.certification-summary-header.no-data .col-status,
.certification-summary-header.no-data .col-published,
.certification-summary-header.no-data .col-expiration {
    color: #aaa !important;
    font-weight: normal !important;
}

/* Certification modal table (use existing door2door modal styling) */
.certification-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.certification-table th,
.certification-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.certification-table th {
    background: #f7f7f7;
}

.certification-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Optionally, you can add additional styling to certification modals
   For example, if you want them to match door2door modals, you can reuse:
*/
.certification-modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.certification-modal-content {
    background: #fff;
    margin: 100px auto;
    padding: 20px;
    border-radius: 8px;
    width: 60%;
    max-width: 800px;
    position: relative;
}

.certification-modal .door2door-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 18px;
    cursor: pointer;
}

.stock-price-display {
    display: inline-block !important;
    text-align: left;
    color: #333;

}

/* Remove right border on the last column in each row */
.certification-summary-header .certification-col:last-child,
.certification-summary .certification-col:last-child {
    border-right: none;
}

/* For columns like 'Status', 'Certification Number', or 'Social Purpose' in the Social Enterprise section,
   adjust widths as needed. In this example, we use percentages to maintain relative widths. */
.certification-col.col-status,
.certification-col.col-certnum,
.certification-col.col-purpose {
    flex: 1;
}

/* You can also apply specific text alignments per column */
.certification-col.col-certnum,
.certification-col.col-purpose {
    text-align: center;
}

/* Optionally, add hover effects for rows if desired */
.certification-summary:hover {
    background: #f9f9f9;
}

/* General Modal Container - hidden by default */
.door2door-modal,
.telemarketing-modal,
.certification-modal,
.prepaid-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    /* Semi-transparent background */
}

/* Modal Content Styling */
.door2door-modal-content,
.telemarketing-modal-content,
.certification-modal-content,
.prepaid-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    width: 80%;
    max-width: 1300px;
    border-radius: 5px;
    position: relative;
}

/* Close Button Styling */
.door2door-modal-close,
.telemarketing-modal-close,
.certification-modal-close,
.prepaid-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

/* Optional hover style for close buttons */
.door2door-modal-close:hover,
.telemarketing-modal-close:hover,
.certification-modal-close:hover,
.prepaid-modal-close:hover {
    color: #f00;
}

.tab-content .map-section {
    margin-top: 10px;
}

.ip-summary-row {
    margin-bottom: 10px;
}

/* 1. Hide the mobile badge on desktop */
.mobile-status-badge {
    display: none;
}

/* 2. Mobile styles */
@media (max-width: 768px) {

    /* — Company header: stack and position badge — */
    .company-header {
        position: relative;
        display: block;
        /* override any flex on desktop */
        padding-top: 40px;
        /* make room for the badge */
    }

    .company-header .company-title,
    .company-header .company-details {
        /* keep their normal look but stack vertically */
        display: block;
        text-align: left;
    }

    /* show the mobile badge and hide the desktop one */
    .mobile-status-badge {
        display: inline-block;
        position: absolute;
        top: 12px;
        right: 16px;
        z-index: 10;
    }

    .company-details>.status-badge.active {
        display: none;
    }

    /* — Dashboard: move tabs to top and stack panels — */
    .dashboard-container {
        flex-direction: column !important;
        /* stack tabs above content */
    }

    .dashboard-tabs {
        order: 1;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        overflow-x: auto;
        background: #f8f9fa;
        border-radius: 0;
        padding: 10px 9px;
    }

    .dashboard-tabs .tab {
        flex: 1 0 auto;
        margin: 2px 1px;
        padding: 4px 3px;
        justify-content: center;
    }

    .dashboard-content {
        order: 2;
        width: 100%;
        padding-top: 16px;
    }

    /* ensure each content panel sits below its tab */
    .dashboard-content .tab-content {
        margin-top: 0;
    }
}

@media (max-width: 768px) {

    /* Mobile-only tuning tweaks */
    .company-dashboard {
        padding: 5px;
    }

    .registration-numbers {
        gap: 5px;
    }

    .company-header {
        padding: 10px;
    }

    .reg-item {
        font-size: 15px;
    }
}

/* ───── Affiliation tables ───── */
.aff-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0
}

.aff-table th,
.aff-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    font-size: 14px
}

.aff-table th {
    background: #f7f7f7;
    font-weight: 600
}

.aff-table tbody tr:nth-child(even) {
    background: #fafafa
}

/* reusable grey box */
.no-data {
    padding: 20px;
    background: #f8fafc;
    border-radius: 6px;
    color: #64748b
}

/* ===== Shareholders table ===== */
.sh-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0
}

.sh-table th,
.sh-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    font-size: 14px
}

.sh-table th {
    background: #f7f7f7;
    font-weight: 600
}

.sh-table tbody tr:nth-child(even) {
    background: #fafafa
}


.share-modal {
    display: none
}

/* ==== Executives small table (inherits sh-table look) ==== */
.ex-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px
}

.ex-table th,
.ex-table td {
    border: 1px solid #ddd;
    padding: 6px;
    text-align: left;
    font-size: 14px
}

.ex-table th {
    background: #f7f7f7;
    font-weight: 600
}

/* ==== Executives modal ==== */
.exec-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, .4)
}

.exec-modal-content {
    background: #fff;
    margin: 60px auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 1200px;
    position: relative
}

.exec-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer
}

.exec-modal-close:hover {
    color: #f00
}

.section ul {
    margin-bottom: 1em;
    list-style: disc inside;
}

.section p {
    margin-bottom: 1em;
}

/* ── HQ Info “card” ───────────────────────────────────── */
.branch-hq-container {
    position: relative;
    background: #f3f7fa;
    border-radius: 8px;
    padding: 12px 16px 16px;
    margin-bottom: 20px;
}

.branch-hq-container ul.hq-info {
    list-style: none;
    margin: 0;
    padding: 0;
}

.branch-hq-container ul.hq-info li {
    padding: 6px 0;
    border-bottom: 1px solid #dde4e8;
    color: #333;
}

.branch-hq-container ul.hq-info li:last-child {
    border-bottom: none;
}

/* visually highlight the name lines */
.branch-hq-container ul.hq-info li:nth-child(1),
.branch-hq-container ul.hq-info li:nth-child(2) {
    font-weight: 600;
}

/* ── Full-Profile button tweaks ───────────────────────── */
.branch-hq-container .global-license-button {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 90px;
    text-align: center;
    white-space: nowrap;
}

.branch-hq-container .hq-button {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 90px;
    text-align: center;
    white-space: nowrap;
}

.hq-button {
    display: inline-block;
    background-color: #0066cc;
    /* Primary blue color */
    color: #fff;
    padding: 8px 8px;
    font-size: 11px;
    border: none;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    margin-top: -30px;
}

.hq-button:hover {
    background-color: #004c99;
    color: #fff;
}


.branch-section ul.branch-hq {
    background: #f7f7f7;
    border-radius: 8px;
    padding: 12px;
    list-style: none;
    margin: 0 0 20px;
}

.branch-section ul.branch-hq li {
    margin: 4px 0;
}

.branch-section .global-license-button {
    float: right;
    width: 90px;
}

.branch-table th,
.branch-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

/* reuse your .aff-table styling for .branch-table */
.branch-table td small {
    color: #666;
    font-size: 15px;
}

.branch-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}

.branch-table tbody tr:nth-child(even) {
    background: #fafcff;
}

/* make the last column button a fixed width */
.branch-table td:last-child .global-license-button {
    width: 90px;
    text-align: center;
}

.login-overlay-container {
    position: relative;
    display: inline-block;
}

.login-overlay-container img {
    display: block;
}

.login-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5em 1em;
    border-radius: 0.25em;
}


/* ── License Tab New Design ───────────────────────────── */

/*--------------------------------
  Base container for all info-rows
--------------------------------*/
.info-row-2col,
.info-row-3col,
.info-row-4col,
.info-row-5col,
.info-row-6col {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

/* 2-col overrides */
.info-row-2col {
    gap: 20px;
    margin-bottom: 5px;
    color: #666;
    font-weight: 500;
}

/* 3-col overrides */
.info-row-3col {
    gap: 20px;
    margin-bottom: 20px;
    font-weight: 500;
}

/* 4-col overrides */
.info-row-4col {
    gap: 20px;
    margin-bottom: 20px;
    font-weight: 500;
}

/*--------------------------------
  Column widths by layout
--------------------------------*/
.info-row-2col .col {
    flex: 1 1 40%;
    min-width: 120px;
}

.info-row-3col .col {
    flex: 1 1 30%;
    min-width: 120px;
}

.info-row-4col .col {
    flex: 1 1 22%;
    min-width: 120px;
}

.info-row-5col .col {
    flex: 1 1 18%;
    min-width: 100px;
}

.info-row-6col .col {
    flex: 1 1 calc((100% - (5 * 16px)) / 7);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}


/*--------------------------------
  Common column styling (2/3/4-col)
--------------------------------*/
.info-row-2col .col,
.info-row-3col .col,
.info-row-4col .col,
.info-row-5col .col {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.cert-section .info-row-2col .col,
.cert-section .info-row-3col .col,
.cert-section .info-row-4col .col,
.cert-section .info-row-5col .col,
.cert-section .info-row-6col .col {
    border-bottom: none;
}


/*--------------------------------
  Labels & values
--------------------------------*/
.info-row-3col .info-label {
    color: #666;
    font-weight: 500;
    margin-bottom: 5px;
}

.info-row-2col .info-value,
.info-row-3col .info-value {
    color: #333;
    font-size: 16px;
}

/*--------------------------------
  “Not available” styling in 3-col
--------------------------------*/
.info-row-3col .col.na .info-label,
.info-row-3col .col.na .info-value {
    color: #999;
    font-style: italic;
}

/*--------------------------------
  License-section overrides (3-col only)
--------------------------------*/
.license-section.mail-order .info-row-3col .col,
.license-section.door2door .info-row-3col .col,
.license-section.telemarketing.info-row-3col .col,
.license-section.prepaid .info-row-3col .col {
    border-bottom: none;
}

.license-section.mail-order .info-row-3col .info-label,
.license-section.door2door .info-row-3col .info-label,
.license-section.telemarketing.info-row-3col .info-label,
.license-section.prepaid .info-row-3col .info-label {
    border-bottom: 1px solid #eee;
}

/*--------------------------------
  Responsive stacking
--------------------------------*/
/* tablet: stack 2- and 3-cols */
@media (max-width: 768px) {

    .info-row-2col,
    .info-row-3col {
        flex-direction: column;
    }
}

/* mobile: stack all layouts */
@media (max-width: 600px) {

    .info-row-2col,
    .info-row-3col,
    .info-row-4col,
    .info-row-5col,
    .info-row-6col {
        flex-direction: column;
    }
}

/*--------------------------------
  Standalone “not available” text
--------------------------------*/
.not-available-text {
    font-size: 16px;
    font-weight: normal;
    color: #333;
}

.license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    background-color: #eee;
    margin-left: -20px;
}

.license-header>div:first-child {
    font-weight: 500;
    font-size: 17px;
    padding-left: 20px;
}

.license-header .global-license-button {
    white-space: nowrap;
}

/* three-column grid */
.info-row-3col {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.info-row-3col .col {
    flex: 1;
    min-width: 120px;
}

/* gray out when Not available */
.info-row-3col .col.na .info-label,
.info-row-3col .col.na .info-value {
    color: #999;
    font-style: italic;
}

/* separator line */
.license-separator {
    border: none;
    border-top: 1px solid #eee;
    margin: 16px 0;
}

/* gray out when "Not available" */
.col.na .info-label,
.col.na .info-value {
    color: #999;
    font-style: italic;
}

/* header styling */
.cert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    background-color: #eee;
    margin-left: -20px;
}

.cert-header>div {
    font-weight: 500;
    font-size: 17px;
    padding-left: 20px;
}

.cert-section .info-label {
    border-bottom: 1px solid #eee;
}

.info-row-2col:last-child .col:last-child {
    /*display: none;*/
}

.biz-title-link {
    text-decoration: none;
    color: inherit;
}

.biz-title-link:hover {
    text-decoration: none;
    color: #0066cc;
    /* or any color you prefer */
}

/*=============================================
= 1) Nav-bar wrapper (positioning context) =
=============================================*/
.bizpage-nav-bar {
    position: relative;
    /* so children can be absolutely positioned */
    /* padding: 0px 0 20px;*/
    /* top for space, bottom so it never collapses */
    margin-bottom: 20px;
    margin-top: 20px;
    /* consistent gap below the bar */
}

/*=================================
= 2) Back button (your existing) =
=================================*/
.bizpage-back-btn {
    position: absolute;
    /* remove from normal flow */
    top: 15px;
    /* align with top padding of nav-bar */
    /*left: 1rem;*/
    /* hug the left edge */
    z-index: 2;
    /* sit above search box if overlapping */

    /* your base styling */
    display: inline-block;
    padding: 0.5em 1em;
    background-color: #626262;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

/* hover / focus */
.bizpage-back-btn:hover,
.bizpage-back-btn:focus {
    background-color: #0066cc;
    outline: none;
    color: #fff;
}

/* active */
.bizpage-back-btn:active {
    background-color: #fff;
}

/*========================================
= 3) Search container (always centered) =
========================================*/
.bizpage-search-container {
    position: static;
    /* back in-flow so margin auto works */
    width: 85%;
    max-width: 800px;
    margin: 0 auto;
    /* centers within the nav-bar */
    z-index: 1;
    /* behind the back-button if overlap */
}

/* ensure the form inside resizes to fill its container */
.bizpage-search-container .wp-block-search__inside-wrapper {
    width: 100% !important;
}

@media (max-width: 600px) {

    /* 1) Nav-bar: relative + vertical stack + consistent padding */
    .bizpage-nav-bar {
        position: relative;
        /* still the containing block */
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        /* space between back-btn & search */
        padding: 0px 0.5rem;
        /* top/bottom + horizontal gutter */
        margin-bottom: 20px;
        /* same as desktop */
    }

    /* 2) Back button: now in-flow, full width tappable */
    .bizpage-back-btn {
        position: static !important;
        /* remove absolute */
        display: block;
        width: 100%;
        margin: 0;
        /* reset desktop offset */
        padding: 0.5em 1em;
        /* ensure tappable height */
        text-align: left;
    }

    /* 3) Search container: full width, static */
    .bizpage-search-container {
        position: static !important;
        /* undo desktop absolute */
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0;
        /* reset desktop centering */
    }

    /* 4) Inner search wrapper: also full width */
    .bizpage-search-container .wp-block-search__inside-wrapper {
        width: 100% !important;
    }
}

.user-panel-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 12px;

}

/* Every direct child stays sized to its content */
.user-panel-container>* {
    flex: 0 0 auto;
}

.user-panel-container .credit-info-box {
    margin-left: auto;
    /* sends this block to the right edge */
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    /* prevents weird overflow calculations */
}

.getpaid-button-tooltip-wrapper>button {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    white-space: nowrap;
}

@media (max-width: 600px) {

    /* Hide text for enabled button */
    #buy-credits-button .getpaid-payment-button .getpaid-button-text {
        display: none;
    }

    /* Ensure icon is sized when text is hidden */
    #buy-credits-button .getpaid-payment-button .getpaid-button-icon {
        font-size: 1rem;

        /* Disabled button: hide text via font-size:0, keep icon via ::before rule you added */
        .getpaid-button-tooltip-wrapper>button {
            font-size: 0;
            padding: .35rem .5rem;
            /* tighter padding for icon-only */

        }
    }
}

.ccd-btn {
    padding: 8px 12px;
    border: 1px solid #333;
    border-radius: 4px;
    background: #eee;
    cursor: pointer
}

.ccd-btn:disabled {
    opacity: 0.6
}

ccd-download-en-btn:disabled {
    opacity: 0.6
}

/* share the branches-table look */
.branches-table,
.competitors-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.branches-table th,
.branches-table td,
.competitors-table th,
.competitors-table td {
    border: 1px solid #eee;
    padding: 8px 12px;
    text-align: left;
    font-size: 15px;
}

.branches-table th,
.competitors-table th {
    background-color: #f9f9f9;
    font-weight: 600;
}

/* mobile: make table scroll if too wide */
@media (max-width: 600px) {

    .branches-table,
    .competitors-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

.court-directors-updated,
.court-activities-updated {
    text-align: right;
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}



/* ── Activities list ── */
.activities-list {
    list-style: disc inside;
    margin: 0;
    padding: 0;
}

.activities-list li {
    margin-bottom: 8px;
    color: #333;
    font-size: 15px;
}

/* ── Fallback “Not available” ── */
.tab-content#activities .no-data {
    padding: 20px;
    background: #f8fafc;
    border-radius: 6px;
    color: #64748b;
}

.credit-info-box {
    display: flex;
    align-items: center;
    gap: 1em;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    padding-left: 10px;
    border-radius: 8px;
}

#pq-balance-display-area {
    font-weight: bold;
    font-size: 16px;
}

#buy-credits-button .wpgetpaid-payment-button {
    --bs-btn-padding-x: 0.9rem !important;
    --bs-btn-padding-y: 0.15rem !important;
}

/* Round the disabled GetPaid button */
.getpaid-button-tooltip-wrapper button {
    border-radius: 8px;
    cursor: not-allowed;
}

/* Your existing tooltip styles; adjust as needed */
.getpaid-button-tooltip {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    max-width: 250px;
    background: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 8px 12px;
    z-index: 101;
    font-size: 0.9em;
    line-height: 1.4;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-bottom: 5px;
    width: 200px;
    /* space for arrow */
}

/* Style links inside the tooltip */
.getpaid-button-tooltip a {
    color: #ffd700;
    /* gold-ish for contrast */
    text-decoration: underline;
    font-weight: bold;
}

/* Hover state for links */
.getpaid-button-tooltip a:hover {
    color: #fff;
    text-decoration: none;
}

/* Show on hover */
.getpaid-button-tooltip-wrapper:hover .getpaid-button-tooltip,
.getpaid-button-tooltip-wrapper .getpaid-button-tooltip:hover {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

/* The little bottom arrow */
.getpaid-button-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    /* anchored to bottom edge */
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    /* size of arrow */
    border-style: solid;
    border-color:
        #333
        /* arrow’s “face” color matches tooltip bg */
        transparent transparent transparent;
}

/* Restricted‐message styling */
.kobdi-tab-restricted-message {
    background-color: #fff4e5;
    /* light peach background */
    border: 1px solid #ffcc80;
    /* soft orange border */
    padding: 20px;
    /* some breathing room */
    border-radius: 5px;
    /* rounded corners */
    color: #663c00;
    /* dark brown text */
    font-style: italic;
    /* optional flourish */
}

.gsrl-message {
    background: #fff5e6;
    border: 2px solid #ffd324;
    padding: 12px;
    margin: 1em 0;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    animation: gsrl-pulse 2s infinite;
}

.kgpa-cta {
    background-color: #cccccc;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px 20px;
    text-align: center;
    margin: 20px 0;
}

/* DESKTOP STYLES: Buttons are side-by-side */
.kgpa-button-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

/* Style for the "Get Membership" button (using 'a' for specificity) */
a.kgpa-membership-btn {
    background-color: #e74c3c;
    color: #fff;
    border: none;
    padding: 8px 15px;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 1.5;
}

/* Combined hover styles for the membership button */
a.kgpa-membership-btn:hover {
    background-color: #c0392b;
    color: #fff;
    /* Ensures text stays white */
    box-shadow: 0 0.25rem 0.25rem 0.125rem rgba(57, 147, 213, 0.1), 0 0.375rem 0.75rem -0.125rem rgba(57, 147, 213, 0.4);
}

/* Style for the note text */
p.kgpa-note {
    color: #000000;
    margin-top: .5rem;
    margin-bottom: 0px;
}

/* --- NEW CSS FOR MOBILE VIEW --- */
/* This rule applies only to screens 768px wide or smaller */
@media (max-width: 768px) {

    /* Stack the buttons vertically */
    .kgpa-button-group {
        flex-direction: column;
        gap: 10px;
        /* This now controls the vertical space */
    }

    /* Make both button containers take up a consistent width */
    .kgpa-button-group .kgpa-buy-btn,
    .kgpa-button-group a.kgpa-membership-btn {
        width: 100%;
        max-width: 400px;
        /* Prevents buttons from being too wide */
        margin-left: auto;
        /* Helps center the block if max-width is reached */
        margin-right: auto;
        /* Helps center the block if max-width is reached */
    }

    /* Ensure the actual GetPaid button fills its container on mobile */
    .kgpa-button-group .kgpa-buy-btn .getpaid-payment-button {
        width: 100%;
    }
}

/* =================================================================== */
/*  Responsive Icon Button Styles for GetPaid                         */
/* =================================================================== */

/* --- Desktop View --- */

/* Base styles for the icon */
.getpaid-button-icon {
    display: inline-block;
    font-size: 1em;
    color: inherit;
    margin-right: 0.5em;
    transition: all 0.2s ease-in-out;
}

/* Animate icon on button hover */
button:hover .getpaid-button-icon {
    transform: scale(1.1);
}

/* Base styles for the text */
.getpaid-button-text {
    display: inline;
}


/* --- Mobile View (max-width: 767px) --- */
@media (max-width: 767px) {
    .getpaid-button-text {
        display: none;
        /* Hide the text on mobile */
    }

    .getpaid-button-icon {
        margin-right: 0;
        /* Remove space since there's no text */
        font-size: 1.3em;
        /* Make icon larger for better touch interaction */
    }
}

/* Control the icon */
#buy-credits-button .getpaid-button-icon {
    font-size: 16px;
    color: #ffd700;
    /* gold coin look */
}

/* Control the text */
#buy-credits-button .getpaid-button-text {
    color: inherit;
    /* inherit from button */
}

/* Enabled GetPaid button (rendered when user/level is allowed) */
#buy-credits-button .wpgetpaid-payment-button {
    opacity: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Disabled state (wrapper is output only when not allowed) */
.getpaid-button-tooltip-wrapper>button {
    opacity: .6;
    cursor: not-allowed;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    /* keep your rounded look */
}


/* Enabled Buy Credits button (rendered by [getpaid]) */
#buy-credits-button .getpaid-payment-button:not([disabled]):not([aria-disabled="true"]) {
     /* Bootstrap-friendly variable overrides (if GetPaid ships BS) */
    --bs-btn-bg: #0066cc;
    --bs-btn-border-color: #1b63d0;
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: #1a60d1;
    --bs-btn-hover-border-color: #1759c2;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #154fb0;
    --bs-btn-active-border-color: #154aa4;
    --bs-btn-focus-shadow-rgb: 31, 111, 235;
    --bs-btn-padding-x: 0.9rem;
    --bs-btn-padding-y: 0.35rem;
    --bs-btn-border-radius: 8px;

    /* Fallbacks (if variables aren’t used) */
    background-color: var(--bs-btn-bg, #0066cc);
    border-color: var(--bs-btn-border-color, #1b63d0);
    color: var(--bs-btn-color, #fff);
    padding: var(--bs-btn-padding-y, .35rem) var(--bs-btn-padding-x, .9rem);
    border-radius: var(--bs-btn-border-radius, 8px);

    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
}

#buy-credits-button .getpaid-payment-button:hover {
    background-color: var(--bs-btn-hover-bg, #1a60d1);
    border-color: var(--bs-btn-hover-border-color, #1759c2);
    color: var(--bs-btn-hover-color, #fff);
}

#buy-credits-button .getpaid-payment-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 .2rem rgba(var(--bs-btn-focus-shadow-rgb, 31, 111, 235), .25);
}

/* Icon/text inside the enabled button */
#buy-credits-button .getpaid-payment-button .getpaid-button-icon {
    font-size: 1rem;
}

#buy-credits-button .getpaid-payment-button .getpaid-button-text {
    letter-spacing: .2px;
}


/* Disabled wrapper only appears when user is NOT allowed */
.getpaid-button-tooltip-wrapper {
    position: relative;
    display: inline-block;
    cursor: not-allowed;
}

/* The disabled dummy button (inline opacity + pointer-events are kept) */
.getpaid-button-tooltip-wrapper>button {
    background: #cfd3d6;
    border: 1px solid #e5e7eb;
    color: #667085;
    padding: .35rem .9rem;
    border-radius: 8px;

    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
}

/* If your plugin injects an icon/text into the disabled button, style them too */
.getpaid-button-tooltip-wrapper>button .getpaid-button-icon {
    filter: grayscale(1) opacity(.75);
}

.getpaid-button-tooltip-wrapper>button .getpaid-button-text {
    letter-spacing: .2px;
}

/* Optional: tooltip polish */
.getpaid-button-tooltip-wrapper .getpaid-button-tooltip {
    visibility: hidden;
    width: max-content;
    max-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 101;
    bottom: 90%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, visibility 0s linear 0.3s;
    font-size: 0.9em;
    line-height: 1.4;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.getpaid-button-tooltip-wrapper:hover .getpaid-button-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}


/* Disabled wrapper only appears for NOT-ALLOWED users */
.getpaid-button-tooltip-wrapper>button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    /* spacing when text is visible (desktop) */
    padding: .35rem .9rem;
    /* keep your sizing consistent */
}

@media (max-width: 600px) {

    /* Hide the raw text inside the disabled button */
    .getpaid-button-tooltip-wrapper>button {
        font-size: 0;
        /* visually hides text (still accessible) */
        gap: 0;
        /* no gap when text is hidden */
        padding: .35rem .5rem;
        /* tighter padding for an icon-only chip */
    }

    .getpaid-button-tooltip-wrapper>button::before {
        font-size: 1rem;
        /* explicit size for the icon */
        margin: 0;
        /* no spacing needed without text */
    }
}

@media (max-width: 600px) {
    #pq-balance-display-area .label {
        display: none;
    }
}

/* ==== FIX broken mobile block braces & selector ==== */
@media (max-width: 600px) {

    /* Hide text for enabled button */
    #buy-credits-button .getpaid-payment-button .getpaid-button-text {
        display: none;
    }

    /* Ensure icon is sized when text is hidden */
    #buy-credits-button .getpaid-payment-button .getpaid-button-icon {
        font-size: 1rem;
    }

    /* Disabled button: hide text via font-size:0, keep icon via ::before */
    .getpaid-button-tooltip-wrapper>button {
        font-size: 0;
        padding: .35rem .5rem;
    }
}

/* The ID needs a hash; otherwise the rule never matches */
#ccd-download-en-btn:disabled {
    opacity: 0.6;
}

/* ==== NEW: wrap & reflow 751–1299px (“tablet/compact desktop”) ==== */
@media (min-width: 751px) and (max-width: 1299px) {
    .user-panel-container {
        flex-wrap: wrap;
        /* allow wrapping */
        justify-content: flex-start;
        /* line up items left */
        column-gap: 12px;
        row-gap: 8px;
    }

    /* Let items shrink to fit the row, rather than fixed auto width */
    .user-panel-container>* {
        flex: 0 1 auto;
    }

    /* Put the credit box on its own row at the end, left-aligned */
    .user-panel-container .credit-info-box {
        order: 99;
        /*flex: 1 1 100%;*/
        margin-left: 0;
        /* override desktop push-right */
        justify-content: flex-start;
    }

    /* Slightly tighter buttons in this range to reduce early wrapping */
    .ccd-btn,
    .kpdf-btn,
    .bpl-btn {
        padding: 6px 10px;
        font-size: 0.95rem;
    }

    /* Ensure the shortcodes' outer wrappers can wrap cleanly */
    .ccd-btn-container,
    .kpdf-btn-container,
    .bpl-container {
        flex: 0 1 auto;
        max-width: 100%;
    }
}

/* ==== Logged-in variant: ensure mid-range wrap & shrink ==== */
@media (min-width: 751px) and (max-width: 1299px) {

    /* Let direct children actually shrink; this fixes min-width:auto gotcha */
    .user-panel-container>* {
        min-width: 0;
    }

    /* Unstick any plugin-set 0 0 auto that prevents wrapping */
    .user-panel-container>.ccd-btn-container,
    .user-panel-container>.kpdf-btn-container,
    .user-panel-container>.bpl-container,
    .user-panel-container>.credit-info-box {
        flex: 0 1 auto !important;
    }

    /* Prevent long labels from forcing overflow; allow graceful truncation */
    .ccd-btn .ccd-btn-text,
    .kpdf-btn .kpdf-btn-text,
    .bpl-btn .bpl-btn-text {
        white-space: nowrap;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Share widget shouldn’t block wrapping */
    .bpl-container {
        display: inline-flex;
        align-items: center;
    }

    /* Normalize the GetPaid wrapper so it participates nicely in flex */
    #buy-credits-button .getpaid {
        display: inline-flex;
        align-items: center;
    }
}

/* Keep credit box right on wide screens, left on mid-range */
@media (min-width: 1300px) {
    .user-panel-container .credit-info-box {
        margin-left: auto;
    }
}

@media (min-width: 751px) and (max-width: 1299px) {
    .user-panel-container .credit-info-box {
        margin-left: 0;
    }
}

/* Inline History button next to the KR company name */
.biz-title-with-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.biz-title-with-actions .history-inline-btn {
    padding: .15rem .5rem;
    font-size: 12px;
    line-height: 1.2;
}

/* Keep your small-screen icon-only behavior consistent */
@media (max-width: 750px) {
    .biz-title-with-actions .history-inline-btn .btn-label {
        display: none;
    }
}

.info-value-with-actions .history-inline-btn {
    padding: .15rem .5rem;
    font-size: 12px;
    line-height: 1.2;
}

/* Show the FA coin only when the button is ENABLED */
.getpaid-button-tooltip-wrapper > .getpaid-payment-button:not([disabled]):not([aria-disabled="true"])::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f51e";              /* fa-coins */
  line-height: 1;
  display: inline-block;
  margin-right: .5em;
}

/* Never show the pseudo-icon when disabled */
.getpaid-button-tooltip-wrapper > .getpaid-payment-button[disabled]::before,
.getpaid-button-tooltip-wrapper > .getpaid-payment-button[aria-disabled="true"]::before {
  content: none !important;
}

/* True disabled palette (blue → gray) */
#buy-credits-button .getpaid-button-tooltip-wrapper > .getpaid-payment-button[disabled],
#buy-credits-button .getpaid-button-tooltip-wrapper > .getpaid-payment-button[aria-disabled="true"]{
  --bs-btn-bg: #e9ecef;
  --bs-btn-border-color: #ced4da;
  --bs-btn-color: #6c757d;
  --bs-btn-hover-bg: #e9ecef;          /* prevent hover turning blue */
  --bs-btn-hover-border-color: #ced4da;
  --bs-btn-hover-color: #6c757d;
  --bs-btn-active-bg: #e9ecef;
  --bs-btn-active-border-color: #ced4da;
  background-color: var(--bs-btn-bg) !important;
  border-color: var(--bs-btn-border-color) !important;
  color: var(--bs-btn-color) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  opacity: 1 !important;               /* keep text readable */
  filter: none !important;
}

/* If any HTML icon sneaks in, hide it for disabled */
#buy-credits-button .getpaid-button-tooltip-wrapper > .getpaid-payment-button[disabled] .getpaid-button-icon,
#buy-credits-button .getpaid-button-tooltip-wrapper > .getpaid-payment-button[aria-disabled="true"] .getpaid-button-icon{
  display: none !important;
}

/* Wrapper card similar to .company-header */
.bizpage-same-industry {
    display: block;
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Title row */
.bizpage-same-industry__title {
    display: flex;
    align-items: center;
    margin: 0 0 12px 0;
    font-size: 1.125rem; /* ~18px */
    font-weight: 700;
    line-height: 1.3;
}

/* Light touch refinements to the plugin’s list inside this block */
.bizpage-same-industry .kobdi-pl-bullets .kobdi-pl-list {
    margin-top: 6px; /* tighten spacing below the title */
}

.bizpage-same-industry .kobdi-pl-item { 
    padding: 0; 
}

.bizpage-same-industry .kobdi-pl-title {
    font-weight: 600;
}

.bizpage-same-industry .kobdi-pl-field {
    font-size: 0.95em;
    opacity: 0.92;
}

/* Optional: shrink vertical gap between rows a bit */
.bizpage-same-industry .kobdi-pl-bullets .kobdi-pl-list {
    row-gap: 0.4rem;
}

/* --- Certification Icons (Font Awesome 6) --- */
.cert-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.cert-icons {
    display: inline-flex;
    gap: 8px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Base Icon Style */
.cert-icon {
    font-size: 18px;
    cursor: pointer;
    position: relative;
    line-height: 1;
    transition: color 0.2s ease;
}

/* Info Icon (Blue) */
.icon-info {
    color: #3498db;
}

.icon-info:hover {
    color: #2980b9;
}

/* Credit Icon (Orange) */
.icon-credit {
    color: #e67e22;
    cursor: help;
}

.icon-credit:hover {
    color: #d35400;
}

/* --- Tooltip Wrapper (Fixes Disappearing Icon) --- */
.cert-tooltip-wrapper {
    position: relative;
    display: inline-block;
    line-height: 1;
}

/* Tooltip Body */
.cert-tooltip-wrapper[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 10px 12px;
    border-radius: 4px;

    /* --- DYNAMIC DIMENSIONS --- */
    width: max-content;
    /* 1. Hugs the text width */
    max-width: 320px;
    /* 2. Caps the width (wraps text if longer than this) */
    white-space: normal;
    /* 3. Allows wrapping */

    height: auto;
    /* 4. Grows automatically */
    /* max-height: 300px;   <-- Optional: Cap the height */
    /* overflow: hidden;    <-- Note: Since pointer-events is none, user cannot scroll. 
                                It is better to let height grow or use 'hidden' to cut off excess. */

    /* --- TEXT FORMATTING --- */
    font-size: 12px;
    font-family: sans-serif;
    line-height: 1.5;
    text-align: left;

    /* --- TECH SPECS --- */
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    /* Keeps the "No Flickering" fix active */
}


/* Tooltip Arrow */
.cert-tooltip-wrapper[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 120%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    pointer-events: none;
    /* Prevents Flickering */
}

/* --- Kobdi Info Modal (Naked Post) --- */
.kobdi-info-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.kobdi-info-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    height: 80%;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s;
}

.kobdi-info-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.kobdi-info-modal-close:hover {
    color: #000;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Financial Alert Box --- */
.kobdi-alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.kobdi-alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

/* Trend Badges (Pills) */
.trend-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    /* Pill shape */
    font-weight: 600;
    font-size: 0.9em;
}

/* Up Trend (Emerald Green) */
.trend-badge.trend-up {
    background-color: #ECFDF5;
    /* Very light emerald background */
    color: #10B981;
    /* Emerald Green text/icon */
}

/* Down Trend (Coral/Crimson Red) */
.trend-badge.trend-down {
    background-color: #FEF2F2;
    /* Very light red background */
    color: #DC2626;
    /* Crimson Red text/icon */
}

/* Neutral/Info Trend */
.trend-badge.trend-neutral {
    background-color: #F3F4F6;
    color: #6B7280;
}

/* Font Weights for Rank Display */
.rank-display .current-rank {
    font-weight: 700;
    /* Boldest */
    color: #111;
}

.rank-display .total-count {
    font-weight: 400;
    /* Lighter */
    color: #666;
    font-size: 0.8em;
}

/* --- Registrations Tab Styles --- */

/* Franchise Disclosure Header Row */
.franchise-header-row {
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.franchise-header-row .info-label {
    display: inline-block;
    margin-right: 5px;
    color: #666;
    font-weight: 500;
}

.franchise-header-row .info-value {
    display: inline-block;
    color: #333;
    font-weight: 700;
    /* Bold as requested */
    font-size: 16px;
}

/* Ensure no negative margin issues on mobile */
@media (max-width: 768px) {
    .franchise-header-row {
        margin-bottom: 10px;
    }
}

/* ── Multi-Email Display Logic ── */

/* The Grid Container */
.email-multi-list {
    display: grid;
    /* Create 2 equal columns. minmax(0, 1fr) prevents overflow issues */
    grid-template-columns: repeat(2, minmax(0, 1fr)); 
    column-gap: 20px;
    row-gap: 8px;
    margin-top: 5px;
    width: 100%;
}

/* Individual Cell Wrapper */
.email-entry {
    display: flex;
    align-items: center; /* Vertically align icon and text */
    gap: 8px;            /* Space between icon and text */
    min-width: 0;        /* Allows text truncation/break if needed */
}

/* The Link Text */
.email-item-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 15px;
    word-break: break-all; /* Prevents long emails from breaking layout */
    line-height: 1.4;
}

.email-item-link:hover {
    color: #004c99;
    text-decoration: underline;
}

/* The Icon (Unlinked) */
.email-icon {
    color: #888;  /* Muted grey color */
    font-size: 14px;
    flex-shrink: 0; /* Prevents icon from squishing */
    margin-top: 2px; /* Slight optical adjustment */
}

/* Mobile Response: Stack to 1 column on small screens */
@media (max-width: 600px) {
    .email-multi-list {
        grid-template-columns: 1fr;
    }
}

/* ── Online Presence Grid ── */

.website-multi-grid {
    display: grid;
    /* 5 Columns as requested */
    grid-template-columns: repeat(5, minmax(0, 1fr)); 
    column-gap: 15px;
    row-gap: 10px;
    margin-top: 10px;
    width: 100%;
}

.website-entry {
    display: flex;
    align-items: center;
    gap: 6px;      /* Space between icon and text */
    min-width: 0;  /* Allows word breaking inside the grid cell */
}

.website-icon {
    color: #888;   /* Muted grey */
    font-size: 14px;
    flex-shrink: 0; /* Prevent icon from shrinking */
    margin-top: 2px;
}

.website-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 16px;
    word-break: break-all; /* Ensures long domains don't break the layout */
    line-height: 1.3;
}

.website-link:hover {
    color: #004c99;
    text-decoration: underline;
}

/* ── Responsive Adjustments ── */

/* Tablet: Reduce to 3 columns (5 is too crowded on medium screens) */
@media (max-width: 1024px) {
    .website-multi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Mobile: Reduce to 1 column */
@media (max-width: 600px) {
    .website-multi-grid {
        grid-template-columns: 1fr;
    }
}

/* Hide Bizpage Search Bar on Mobile */
@media (max-width: 768px) {
    .bizpage-search-container {
        display: none !important;
    }
}
