/* IPje.nl IP Tools v1.0.0 - Team XITENS */

.ipt-heading {
    margin: 24px 0;
}

.ipt-heading h1 {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ipt-heading h1 svg {
    color: #ff7f00;
    flex-shrink: 0;
}

.ipt-heading p {
    opacity: .8;
}

.ipt-card {
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 20px;
    min-width: 0;
}

.ipt-card h2 {
    font-size: 19px;
    margin: 0 0 18px;
}

.ipt-card h2:not(:first-child) {
    margin-top: 24px;
}

.ipt-address {
    padding: 12px 0;
}

.ipt-address + .ipt-address {
    border-top: 1px solid #ddd;
    margin-top: 12px;
    padding-top: 24px;
}

.ipt-address-label {
    color: #a84e00;
    font-weight: 700;
    font-size: 14px;
}

.ipt-address-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
}

.ipt-address-row strong {
    font-size: clamp(20px, 3.5vw, 32px);
    overflow-wrap: anywhere;
}

.ipt-copy {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 7px;
    color: inherit;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-flex;
}

.ipt-copy:hover {
    color: #ff7f00;
    border-color: #ff7f00;
}

.ipt-copy:disabled {
    opacity: .4;
    cursor: default;
}

.ipt-muted {
    opacity: .75;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.ipt-grid,
.ipt-whois-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.ipt-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ipt-grid .ipt-card {
    height: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
}

.ipt-details {
    margin: 0;
    display: grid;
    gap: 5px;
}

.ipt-details dt {
    font-size: 12px;
    opacity: .75;
}

.ipt-details dd {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.ipt-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    background: #ff7f00;
    color: #171717;
    border: 0;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.ipt-button:hover:not(:disabled) {
    background: #e36b00;
    color: #171717;
}

.ipt-button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.ipt-center {
    text-align: center;
    margin: 24px 0;
}

.ipt-form-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 12px;
    margin: 10px 0 18px;
}

.ipt-form-row input {
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 7px;
    padding: 14px;
    font-size: 16px;
}

.ipt-form-row input:focus {
    outline: 2px solid #ff7f00;
    outline-offset: 1px;
}

.ipt-netblocks {
    border: 1px solid #ddd;
    border-radius: 7px;
    margin-top: 10px;
    overflow: hidden;
}

.ipt-netblocks summary {
    padding: 12px;
    font-weight: 700;
    cursor: pointer;
}

.ipt-total {
    padding: 0 12px;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.ipt-table-wrap {
    max-height: 300px;
    overflow: auto;
}

.ipt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.ipt-table th {
    background: #f5f5f5;
    position: sticky;
    top: 0;
    border-bottom: 2px solid #ff7f00;
    text-align: left;
}

.ipt-table th,
.ipt-table td {
    padding: 10px;
    overflow-wrap: anywhere;
}

.ipt-table td {
    border-bottom: 1px solid #ddd;
}

#whois-map {
    height: 550px;
    width: 100%;
    border-radius: 8px;
    background: #eee;
    z-index: 1;
}

.ipt-explanation p {
    line-height: 1.7;
}

.ipt-error {
    color: #b91c1c;
}

[data-theme="dark"] .ipt-card {
    background: #1e1e1e;
    border-color: #383838;
}

[data-theme="dark"] .ipt-address-label {
    color: #ff9b38;
}

[data-theme="dark"] .ipt-address,
[data-theme="dark"] .ipt-copy,
[data-theme="dark"] .ipt-netblocks,
[data-theme="dark"] .ipt-table td {
    border-color: #383838;
}

[data-theme="dark"] .ipt-form-row input {
    background: #252525;
    color: #f5f5f5;
    border-color: #555;
}

[data-theme="dark"] .ipt-table th {
    background: #292929;
}

[data-theme="dark"] .ipt-error {
    color: #fca5a5;
}

[data-theme="dark"] #whois-map {
    background: #171717;
}

[data-theme="dark"] #whois-map .leaflet-tile-pane {
    filter: brightness(.75) saturate(.75);
}

[data-theme="dark"] .leaflet-popup-content-wrapper,
[data-theme="dark"] .leaflet-popup-tip {
    background: #252525;
    color: #f5f5f5;
}

@media (max-width: 1000px) {
    .ipt-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media (max-width: 700px) {
    .ipt-whois-grid,
    .ipt-form-row {
        grid-template-columns: 1fr;
    }

    .ipt-card {
        padding: 15px;
    }

    #whois-map {
        height: 350px;
    }
}

@media (max-width: 420px) {
    .ipt-grid {
        grid-template-columns: 1fr;
    }
}

/* IPje.nl Premium UI v1.1.0 */

.ipt-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #fff0e1;
    color: #b85b00;
    flex-shrink: 0;
    vertical-align: middle;
}

.ipt-svg {
    width: 21px;
    height: 21px;
    flex-shrink: 0;
}

.ipt-heading {
    margin: 32px 0 26px;
}

.ipt-heading h1 {
    font-size: clamp(24px, 4vw, 32px);
    letter-spacing: -.7px;
    line-height: 1.3;
    margin-bottom: 10px;
}

.ipt-heading h1 .ipt-icon-wrap {
    width: 50px;
    height: 50px;
    border-radius: 13px;
}

.ipt-heading h1 .ipt-svg {
    width: 27px;
    height: 27px;
}

.ipt-heading p {
    font-size: 15px;
    margin-top: 8px;
}

.ipt-card {
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 3px 14px rgba(0,0,0,.035);
}

.ipt-icon-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #ededed;
}

#my-ip {
    padding: 26px;
}

.ipt-address-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    letter-spacing: .3px;
}

.ipt-address-label .ipt-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.ipt-address-label .ipt-svg {
    width: 18px;
    height: 18px;
}

.ipt-address-row {
    justify-content: space-between;
    gap: 16px;
    margin: 15px 0;
}

.ipt-address-row strong {
    font-size: clamp(22px, 4vw, 36px);
    font-weight: 750;
    letter-spacing: -.8px;
    font-variant-numeric: tabular-nums;
}

.ipt-address .ipt-muted {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.ipt-muted .ipt-icon-wrap {
    background: transparent;
    color: inherit;
    width: 20px;
    height: 20px;
}

.ipt-muted .ipt-svg {
    width: 16px;
    height: 16px;
}

.ipt-copy {
    padding: 11px;
    border-radius: 9px;
    transition: background .15s, border-color .15s;
}

.ipt-copy:hover:not(:disabled) {
    background: #fff0e1;
}

.ipt-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 18px;
    align-items: stretch;
}

.ipt-details {
    gap: 7px;
}

.ipt-details dt {
    font-size: 12px;
    font-weight: 500;
}

.ipt-details dd {
    font-size: 15px;
    margin-bottom: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.ipt-button {
    gap: 10px;
    min-height: 44px;
    border-radius: 9px;
    box-sizing: border-box;
    transition: background .15s;
}

.ipt-button .ipt-icon-wrap {
    width: 20px;
    height: 20px;
    color: inherit;
    background: transparent;
}

.ipt-button .ipt-svg {
    width: 19px;
    height: 19px;
}

.ipt-center .ipt-button {
    width: 100%;
    padding: 16px 24px;
    font-size: 15px;
}

.ipt-whois-grid {
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: 20px;
}

.ipt-netblocks {
    border-radius: 10px;
}

.ipt-netblocks summary {
    background: #f7f7f7;
    padding: 15px;
}

.ipt-netblocks[open] summary {
    border-bottom: 2px solid #ff7f00;
}

.ipt-total {
    margin: 14px;
    padding: 12px;
    border-radius: 8px;
    background: #f5f5f5;
}

.ipt-total strong {
    display: block;
    font-size: 16px;
    margin-top: 6px;
    font-variant-numeric: tabular-nums;
}

.ipt-table th,
.ipt-table td {
    padding: 12px;
}

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

.ipt-table td:last-child,
.ipt-table th:last-child {
    text-align: right;
}

#whois-map {
    border: 1px solid #ddd;
    border-radius: 11px;
    box-sizing: border-box;
}

[data-theme="dark"] .ipt-icon-wrap {
    background: #38291e;
    color: #ff9b38;
}

[data-theme="dark"] .ipt-card {
    box-shadow: 0 3px 14px rgba(0,0,0,.12);
}

[data-theme="dark"] .ipt-icon-heading {
    border-color: #383838;
}

[data-theme="dark"] .ipt-copy:hover:not(:disabled) {
    background: #38291e;
}

[data-theme="dark"] .ipt-netblocks summary,
[data-theme="dark"] .ipt-total {
    background: #292929;
}

[data-theme="dark"] .ipt-table tbody tr:nth-child(even) {
    background: #252525;
}

[data-theme="dark"] #whois-map {
    border-color: #383838;
}

[data-theme="dark"] .ipt-button .ipt-icon-wrap,
[data-theme="dark"] .ipt-muted .ipt-icon-wrap {
    background: transparent;
    color: inherit;
}

@media (max-width: 700px) {
    .ipt-card, #my-ip {
        padding: 18px;
    }

    .ipt-whois-grid {
        grid-template-columns: 1fr;
    }

    .ipt-heading h1 .ipt-icon-wrap {
        width: 42px;
        height: 42px;
    }

    .ipt-address-row strong {
        letter-spacing: -.4px;
    }
}

@media (max-width: 480px) {
    .ipt-grid {
        grid-template-columns: 1fr;
    }
}


/* IPje.nl Icon Alignment v1.1.1 */

.ipt-card h2.ipt-icon-heading {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 12px;
    text-align: left;
    line-height: 1.4;
}

.ipt-icon-heading .ipt-icon-wrap {
    display: inline-flex !important;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
}

.ipt-icon-heading .ipt-svg {
    display: block;
    width: 21px !important;
    height: 21px !important;
    margin: 0 !important;
}

.ipt-heading h1 {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px;
    text-align: left;
}


/* IPje.nl Dashboard Redesign v1.2.0 */

:root {
    --ipt-accent: #ff7f00;
    --ipt-soft: #fff3e6;
    --ipt-line: #e7e7e7;
    --ipt-panel: #ffffff;
    --ipt-secondary: #f7f7f7;
    --ipt-muted-color: #737373;
}

[data-theme="dark"] {
    --ipt-soft: #38291e;
    --ipt-line: #383838;
    --ipt-panel: #1e1e1e;
    --ipt-secondary: #292929;
    --ipt-muted-color: #a3a3a3;
}

.ipt-heading {
    margin: 30px 0 24px;
}

.ipt-heading h1 {
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 700;
    letter-spacing: -.6px;
}

.ipt-heading h1 .ipt-icon-wrap {
    width: 48px;
    height: 48px;
    background: var(--ipt-soft);
    color: var(--ipt-accent);
}

.ipt-heading p {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--ipt-muted-color);
}

.ipt-card {
    background: var(--ipt-panel);
    border: 1px solid var(--ipt-line);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,.035);
}

.ipt-card h2.ipt-icon-heading {
    font-size: 17px;
    font-weight: 700;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.ipt-icon-heading .ipt-icon-wrap {
    background: var(--ipt-soft);
    color: var(--ipt-accent);
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 10px;
}

/* Separate IPv4 and IPv6 cards */

#my-ip.ipt-address-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    margin-bottom: 18px;
}

#my-ip .ipt-address {
    border: 1px solid var(--ipt-line);
    padding: 22px;
    margin: 0;
    min-width: 0;
}

.ipt-address-label {
    color: inherit;
    font-size: 14px;
    letter-spacing: 0;
}

.ipt-address-label .ipt-icon-wrap {
    background: var(--ipt-soft);
    color: var(--ipt-accent);
}

.ipt-address-row {
    justify-content: flex-start;
    flex-wrap: wrap;
    margin: 20px 0;
    gap: 12px;
}

.ipt-address-row strong {
    font-size: clamp(20px,2.4vw,30px);
    font-weight: 700;
    letter-spacing: -.8px;
    line-height: 1.3;
    min-width: 0;
}

.ipt-address .ipt-muted {
    padding-top: 16px;
    border-top: 1px solid var(--ipt-line);
    font-size: 12px;
}

.ipt-copy {
    background: var(--ipt-secondary);
    border: 1px solid var(--ipt-line);
    padding: 9px;
}

.ipt-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 9px;
    border-radius: 20px;
    background: var(--ipt-secondary);
    color: var(--ipt-muted-color);
    white-space: nowrap;
}

.ipt-status::before {
    content: "";
    width: 7px;
    height: 7px;
    background: currentColor;
    border-radius: 50%;
}

.ipt-status.online {
    color: #15803d;
    background: #e9f8ee;
}

[data-theme="dark"] .ipt-status.online {
    color: #4ade80;
    background: #163524;
}

/* Compact information cards */

.ipt-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 18px;
}

.ipt-details {
    display: grid;
    grid-template-columns: minmax(85px, .7fr) minmax(0,1.3fr);
    gap: 0;
    align-items: center;
}

.ipt-details dt,
.ipt-details dd {
    margin: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--ipt-line);
    line-height: 1.5;
}

.ipt-details dt {
    font-size: 13px;
    font-weight: 400;
    color: var(--ipt-muted-color);
    opacity: 1;
}

.ipt-details dd {
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

.ipt-details dt:nth-last-child(2),
.ipt-details dd:last-child {
    border-bottom: 0;
}

.ipt-grid .ipt-card {
    height: auto;
}

/* Security states */

.ipt-security-badge {
    display: inline-block;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    background: var(--ipt-secondary);
    color: var(--ipt-muted-color);
}

.ipt-security-badge.negative {
    background: #e9f8ee;
    color: #15803d;
}

.ipt-security-badge.positive {
    background: #fff0e1;
    color: #a84e00;
}

[data-theme="dark"] .ipt-security-badge.negative {
    background: #163524;
    color: #4ade80;
}

[data-theme="dark"] .ipt-security-badge.positive {
    background: #38291e;
    color: #ff9b38;
}

/* Whois result header */

.ipt-result-hero {
    display: flex;
    align-items: center;
    gap: 18px;
}

.ipt-result-hero > .ipt-icon-wrap {
    width: 64px;
    height: 64px;
    background: var(--ipt-soft);
    color: var(--ipt-accent);
    border-radius: 14px;
}

.ipt-result-hero > .ipt-icon-wrap .ipt-svg {
    width: 32px;
    height: 32px;
}

.ipt-result-identity {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.ipt-result-identity strong {
    font-size: clamp(22px,3vw,34px);
    line-height: 1.2;
    letter-spacing: -.8px;
}

.ipt-result-identity > span:last-child {
    font-size: 13px;
    color: var(--ipt-muted-color);
}

.ipt-version-badge {
    background: var(--ipt-soft);
    color: #b85b00;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 6px;
}

[data-theme="dark"] .ipt-version-badge {
    color: #ff9b38;
}

/* Whois dashboard layout */

.ipt-whois-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 18px;
    align-items: stretch;
    margin-bottom: 20px;
}

.ipt-whois-grid > .ipt-card {
    margin-bottom: 0;
}

.ipt-network-card {
    grid-column: 2;
    grid-row: 1;
}

.ipt-map-card {
    grid-column: 1 / -1;
    grid-row: 2;
}

.ipt-blocks-card {
    grid-column: 1 / -1;
    grid-row: 3;
}

#whois-map {
    height: 380px;
    border-radius: 9px;
}

.ipt-netblocks {
    margin-top: 14px;
}

.ipt-netblocks summary {
    background: var(--ipt-secondary);
}

.ipt-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: var(--ipt-secondary);
}

.ipt-total strong {
    margin: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

.ipt-table {
    font-size: 13px;
}

.ipt-table th {
    background: var(--ipt-secondary);
}

.ipt-table td {
    padding: 13px 16px;
}

/* Orange map marker */

.ipt-map-marker {
    background: transparent;
    border: 0;
}

.ipt-map-marker svg {
    display: block;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,.25));
}

.ipt-center .ipt-button {
    min-height: 48px;
    font-size: 14px;
}

@media (max-width: 800px) {
    #my-ip.ipt-address-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .ipt-grid,
    .ipt-whois-grid {
        grid-template-columns: 1fr;
    }

    .ipt-whois-grid > .ipt-card {
        grid-column: 1;
        grid-row: auto;
    }

    .ipt-map-card {
        order: 2;
    }

    .ipt-blocks-card {
        order: 3;
    }

    .ipt-result-hero {
        gap: 10px;
        flex-wrap: wrap;
    }

    .ipt-result-hero > .ipt-icon-wrap {
        width: 44px;
        height: 44px;
    }

    #whois-map {
        height: 320px;
    }

    .ipt-card,
    #my-ip .ipt-address {
        padding: 17px;
    }
}


/* IPje.nl Security Badges v1.2.2 */

.ipt-details dd.ipt-security-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    width: fit-content;
    gap: 7px;
    padding: 5px 12px;
    margin: 0;
    border: 0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    background: #f5f5f5;
    color: #737373;
}

.ipt-security-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.ipt-details dd.ipt-security-badge.negative {
    background: #e9f8ee;
    color: #15803d;
}

.ipt-details dd.ipt-security-badge.positive {
    background: #fee2e2;
    color: #b91c1c;
}

[data-theme="dark"] .ipt-details dd.ipt-security-badge {
    background: #292929;
    color: #a3a3a3;
}

[data-theme="dark"] .ipt-details dd.ipt-security-badge.negative {
    background: #163524;
    color: #4ade80;
}

[data-theme="dark"] .ipt-details dd.ipt-security-badge.positive {
    background: #451a1a;
    color: #fca5a5;
}


/* IPje.nl Heading Alignment v1.2.3 */

.ipt-heading h1 {
    margin-bottom: 0;
}

.ipt-heading > p {
    margin-top: 4px;
    margin-left: 60px;
    line-height: 1.6;
}

@media (max-width: 700px) {
    .ipt-heading > p {
        margin-left: 60px;
    }
}


/* IPje.nl Accessibility Contrast Fix v1.2.4 */

/* Light mode: neutral security status */
html:not([data-theme="dark"]) .ipt-details dd.ipt-security-badge:not(.negative):not(.positive) {
    background: #F0F0F0;
    color: #404040;
}

/* Dark mode: neutral security status */
html[data-theme="dark"] .ipt-details dd.ipt-security-badge:not(.negative):not(.positive) {
    background: #292929;
    color: #E5E5E5;
}


/* IPje.nl Final WCAG Contrast Fix v1.2.6 */

html:not([data-theme="dark"]) .ipt-heading > p {
    color: #404040 !important;
    opacity: 1 !important;
}

html[data-theme="dark"] .ipt-heading > p {
    color: #E5E5E5 !important;
    opacity: 1 !important;
}

