/* Ogólne style dla tabel */

.crm-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
}

.crm-full-table,
.crm-registry-table,
.crm-owners-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
}

.crm-full-table thead,
.crm-registry-table thead,
.crm-owners-table thead {
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
}

.crm-full-table th,
.crm-registry-table th,
.crm-owners-table th {
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    border: 1px solid #ddd;
    vertical-align: top;
}

.crm-full-table th small,
.crm-registry-table th small,
.crm-owners-table th small {
    display: block;
    font-weight: normal;
    font-size: 12px;
    margin-top: 5px;
}

.crm-full-table td,
.crm-registry-table td,
.crm-owners-table td {
    padding: 12px 10px;
    border: 1px solid #ddd;
    vertical-align: top;
}

.crm-full-table tbody tr:hover,
.crm-registry-table tbody tr:hover,
.crm-owners-table tbody tr:hover {
    background: #f9f9f9;
}

/* Flaga kraju */

.crm-flag {
    width: 30px;
    height: auto;
    margin-right: 10px;
    vertical-align: middle;
    border: 1px solid #ddd;
}

.crm-country-name {
    font-weight: 600;
    white-space: nowrap;
}

/* Style dla regionów w tabeli */

.crm-region-row {
    background: #f9f9f9;
}

.crm-region-row td {
    padding-left: 20px;
    font-size: 0.95em;
    color: #555;
}

.crm-region-name {
    font-style: italic;
}

.crm-region-indent {
    display: inline-block;
    margin-right: 5px;
    color: #999;
    font-size: 1.2em;
}

.crm-country-row {
    border-top: 2px solid #ddd;
}

/* Container dla ikon - wyśrodkowanie */

.crm-icons-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

/* Kontener ikonka + nazwa */

.crm-icon-with-name {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    border-bottom: 1px solid #ddd;
    justify-content: center;
    padding-bottom: 15px;
}

/* Ikonki */

.crm-icon-item {
    width: 100%;
    height: 40px;
    flex-shrink: 0;
    margin: 0;
    position: relative;
    cursor: help;
    display: flex;
    align-items: center;
}

/* Nazwa obok ikonki */

.crm-icon-name {
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

.crm-icon-item img {
    width: 30px;
    object-fit: contain;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.crm-icon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #e0e0e0;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    color: #666;
}
/* Tooltip dla ikon */

.crm-icon-item:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 12px;
    z-index: 1000;
    margin-bottom: 5px;
    max-width: 200px;
    white-space: normal;
}

.crm-icon-item:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1000;
}

/* Legenda ikon w nagłówku - TYLKO IKONKI BEZ TEKSTU */

.crm-icons-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.crm-legend-item {
    display: inline-block;
    position: relative;
    cursor: help;
    margin-right: 5px;
}

.crm-legend-item img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.crm-legend-item .crm-icon-placeholder {
    width: 20px;
    height: 20px;
    font-size: 9px;
}

/* Ukryj tekst nazwy typu - pokazuj tylko w tooltip */

.crm-legend-text {
    display: none;
}

/* Tooltip dla legendy */

.crm-legend-item:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 12px;
    z-index: 1000;
    margin-bottom: 5px;
}

.crm-legend-item:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1000;
}

/* Link "More" - czarny z białymi napisami, wyśrodkowany */

.crm-more-link {
    display: block;
    padding: 2px 8px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin: 10px auto 0;
    max-width: 60px;
    text-align: center;
}

.crm-more-link:hover {
    background: #005177;
    color: #fff;
}

/* Sankcje */

.crm-sanction-item {
    padding: 3px 0px 15px 0px;
    font-size: 13px;
    border-bottom: 1px solid #ddd;
    text-align: center;
    font-size: 21px !important;
}

.crm-sanction-item span {
    font-size: 21px !important;
}

/* Linki [Link] w tabelach */

.crm-icon-name a,
.crm-registry-name a,
.crm-owner-name a,
.crm-registry-desc a,
.crm-owner-desc a,
.crm-sanction-item a {
    display: inline-block;
    padding: 2px 8px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin: 0 3px;
}

.crm-icon-name a:hover,
.crm-registry-name a:hover,
.crm-owner-name a:hover,
.crm-registry-desc a:hover,
.crm-owner-desc a:hover,
.crm-sanction-item a:hover {
    background: #005177;
    color: #fff;
}

/* Pusta wartość */

.crm-empty {
    color: #999;
    font-style: italic;
}

/* Szerokości kolumn dla pełnej tabeli */

.crm-full-table .crm-country-col {
    width: 20%;
    min-width: 150px;
}

.crm-full-table .crm-registry-col,
.crm-full-table .crm-owners-col,
.crm-full-table .crm-sanctions-col {
    width: 26.66%;
    min-width: 200px;
}

/* Szerokości kolumn dla tabeli registry */

.crm-registry-table .crm-country-col {
    width: 20%;
    min-width: 150px;
}

.crm-registry-table .crm-name-col {
    width: 25%;
    min-width: 180px;
}

.crm-registry-table .crm-access-col {
    width: 15%;
    min-width: 120px;
    text-align: center;
}

.crm-registry-table .crm-info-col {
    width: 40%;
    min-width: 250px;
}

/* Szerokości kolumn dla tabeli owners */

.crm-owners-table .crm-country-col {
    width: 20%;
    min-width: 150px;
}

.crm-owners-table .crm-name-col {
    width: 25%;
    min-width: 180px;
}

.crm-owners-table .crm-access-col {
    width: 15%;
    min-width: 120px;
    text-align: center;
}

.crm-owners-table .crm-info-col {
    width: 40%;
    min-width: 250px;
}

/* Responsywność dla tabletów */

@media screen and (max-width: 1024px) {
    .crm-full-table,
    .crm-registry-table,
    .crm-owners-table {
        font-size: 13px;
    }



    .crm-icon-item {
        width: 35px;
        height: 35px;
    }



    .crm-icon-placeholder {
        width: 35px;
        height: 35px;
        font-size: 11px;
    }



    .crm-icon-name {
        font-size: 12px;
    }
}

/* Responsywność dla mobile */

@media screen and (max-width: 991px) {
    /* === TAP TO ZOOM === */
    
    /* Przycisk toggle nad tabelą */
    .crm-zoom-toggle {
        display: block;
        width: 100%;
        padding: 12px;
        margin-bottom: 10px;
        background: #000;
        color: #fff;
        border: none;
        border-radius: 6px;
        font-size: 14px;
        font-weight: bold;
        cursor: pointer;
        text-align: center;
        transition: background 0.3s ease;
    }
    
    .crm-zoom-toggle:hover {
        background: #333;
    }
    
    .crm-zoom-toggle.zoomed {
        background: #555;
    }
    
    /* Wrapper kontroluje overflow */
    .crm-table-wrapper {
        overflow: hidden;
        -webkit-overflow-scrolling: touch;
        position: relative;
        transition: all 0.4s ease;
    }
    
    /* Inner container - ZMNIEJSZONE DO 30% używając ZOOM */
    .crm-table-container {
        zoom: 0.30;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Po kliknięciu przycisku */
    .crm-table-wrapper.crm-zoomed {
        overflow-x: auto;
    }
    
    .crm-table-wrapper.crm-zoomed .crm-table-container {
        zoom: 1;
    }

    .crm-full-table,
    .crm-registry-table,
    .crm-owners-table {
        font-size: 12px;
        min-width: 600px;
    }

    .crm-full-table th,
    .crm-registry-table th,
    .crm-owners-table th,
    .crm-full-table td,
    .crm-registry-table td,
    .crm-owners-table td {
        padding: 8px 6px;
    }

    .crm-flag {
        width: 20px;
        margin-right: 5px;
    }

    .crm-icon-item {
        width: 30px;
        height: 30px;
    }

    .crm-icon-placeholder {
        width: 30px;
        height: 30px;
        font-size: 10px;
    }

    .crm-icon-name {
        font-size: 11px;
    }

    .crm-icon-with-name {
        gap: 8px;
    }

    .crm-icons-legend {
        gap: 3px;
    }

    .crm-legend-item img,
    .crm-legend-item .crm-icon-placeholder {
        width: 16px;
        height: 16px;
        font-size: 8px;
    }

    .crm-more-link {
        padding: 2px 15px;
        font-size: 11px;
    }
}

/* Bardzo małe ekrany */

@media screen and (max-width: 480px) {
    .crm-full-table,
    .crm-registry-table,
    .crm-owners-table {
        font-size: 11px;
        min-width: 500px;
    }



    .crm-icon-item {
        width: 25px;
        height: 25px;
    }



    .crm-icon-placeholder {
        width: 25px;
        height: 25px;
        font-size: 9px;
    }
}

/* Print styles */

@media print {
    .crm-table-wrapper {
        overflow: visible;
    }



    .crm-full-table,
    .crm-registry-table,
    .crm-owners-table {
        page-break-inside: auto;
    }



    .crm-full-table tr,
    .crm-registry-table tr,
    .crm-owners-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }



    .crm-more-link {
        display: none;
    }
}

/* Highlight effect dla wiersza po kliknięciu w mapę */

.crm-highlight-row {
    animation: crm-pulse 2s ease-in-out;
    background: #fff3cd !important;
}

@keyframes crm-pulse {
    0% {
        background: #fff3cd;
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }

    50% {
        background: #fff9e6;
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }

    100% {
        background: #f9f9f9;
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* Nagłówki: tekst od góry, ikonki legendy przy dole */

.crm-full-table th.crm-registry-col,
.crm-full-table th.crm-owners-col,
.crm-full-table th.crm-sanctions-col,
.crm-registry-table th.crm-access-col,
.crm-owners-table th.crm-access-col {
    height: 1px; /* trick for flex in table cell */
}

.crm-full-table th.crm-registry-col > *,
.crm-full-table th.crm-owners-col > *,
.crm-full-table th.crm-sanctions-col > * {
    display: block;
}

.crm-full-table th .crm-icons-legend,
.crm-registry-table th .crm-icons-legend,
.crm-owners-table th .crm-icons-legend {
    margin-top: auto;
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
}

.crm-full-table th.crm-registry-col,
.crm-full-table th.crm-owners-col,
.crm-full-table th.crm-sanctions-col,
.crm-registry-table th.crm-access-col,
.crm-owners-table th.crm-access-col {
    position: relative;
    padding-bottom: 45px;
}

/* Nowy layout komórek w tabeli głównej */

.crm-cell-entries {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.crm-cell-entry {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.crm-cell-entry:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Górna linia: ikonka + linki + more obok siebie */

.crm-entry-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
    flex-wrap: wrap;
    justify-content: start
}

.crm-entry-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crm-entry-icon .crm-icon-item {
    width: 40px;
    height: 40px;
}

.crm-entry-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

/* Linki wewnątrz crm-entry-links - inline, nie blokowe */
.crm-entry-links a {
    display: inline-block;
    padding: 2px 8px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
}

/* Reset MS Word - p i span muszą być inline w entry-links */
.crm-entry-links p,
.crm-entry-links br {
    display: inline;
    margin: 0;
    padding: 0;
}
.crm-entry-links span {
    display: inline;
    font-family: inherit !important;
    font-size: inherit !important;
    color: inherit !important;
    background: none !important;
}

.crm-entry-name a {
    display: inline-block;
    padding: 2px 8px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    max-width: 60px;
    text-align: center;
}

/* Reset MS Word dla entry-name */
.crm-entry-name p {
    margin: 0;
    padding: 0;
}
.crm-entry-name span {
    font-family: inherit !important;
    font-size: inherit !important;
    color: inherit !important;
    background: none !important;
}

/* Notka pod nazwą */
.crm-entry-note {
    font-size: 18px;
    margin-top: 3px;
}
.crm-entry-note p {
    margin: 0;
    padding: 0;
}
.crm-entry-note span {
    font-family: inherit !important;
    font-size: inherit !important;
    color: inherit !important;
    background: none !important;
}

.crm-full-table th small {
    margin-bottom: 25px;
}

/* More link inline w entry-top */

.crm-entry-top .crm-more-link {
    display: inline-block;
    margin: 0;
    flex-shrink: 0;
}

/* Nazwa pod górną linią */

.crm-entry-name {
    line-height: 1.4;
    color: #333;
}

/* Etykieta regionu w podtabelach */

.crm-region-label {
    color: #000;
    margin-bottom: 3px;
    font-weight: bold;
}
.MsoNormal {
    margin: 0px !important;
}

/* Rowspan: vertical-align na środek dla kraju */

.crm-country-name[rowspan] {
    vertical-align: top;
}

/* Linki w komórce nazwy (podstrony) */

.crm-cell-links {
    margin-bottom: 5px;
}

.crm-access-col.info {
    margin-bottom: 75px;
    width: 100%;
}
tbody td {
    font-size: 18px !important;
}
tbody td p{
    font-size: 18px !important;
    margin: 0px !important;
}
tbody td span{
    font-size: 18px !important;
}
tbody td a{
    font-size: 18px !important;
}
thead small{
    font-size: 18px !important;
}
thead th{
    font-size: 18px !important;
}
thead th span{
    font-size: 18px !important;
}