/*
 * IPje.nl Design System
 * Version: 2.0.0
 * Developed by Team XITENS
 */

:root {
    color-scheme: light;
    --primary: #FF7F00;
    --primary-hover: #E36B00;
    --primary-text: #A84E00;
    --background: #F5F5F5;
    --surface: #FFFFFF;
    --surface-alt: #F9FAFB;
    --text: #333333;
    --muted: #6B7280;
    --border: #E5E7EB;
    --table-header: #FFE0CC;
    --success: #16A34A;
    --danger: #DC2626;
    --warning: #D97706;
    --map-land: #FFD5B0;
    --map-water: #F0F2F5;
    --map-border: #FFFFFF;
    --shadow: 0 4px 16px rgba(0,0,0,.05);
    --radius: 12px;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --primary-text: #FF9B38;
    --background: #121212;
    --surface: #1E1E1E;
    --surface-alt: #252525;
    --text: #F5F5F5;
    --muted: #A3A3A3;
    --border: #363636;
    --table-header: #38291E;
    --success: #4ADE80;
    --danger: #F87171;
    --warning: #FBBF24;
    --map-land: #75491F;
    --map-water: #181818;
    --map-border: #252525;
    --shadow: 0 4px 16px rgba(0,0,0,.20);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary-text);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button, input, select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.ipje-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.ipje-nav {
    max-width: 1280px;
    margin: auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.ipje-logo img {
    display: block;
    width: 140px;
    height: auto;
}

.ipje-menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.ipje-menu a {
    padding: 8px 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
}





.ipje-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ipje-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.ipje-theme-button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-alt);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ipje-theme-button:hover {
    color: var(--primary-text);
    border-color: var(--primary);
}

.ipje-container {
    width: 100%;
    max-width: 1200px;
    margin: 36px auto;
    padding: 0 24px;
}

.ipje-page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 6px;
    font-size: 30px;
    line-height: 1.3;
}

.ipje-page-title .ipje-icon {
    width: 30px;
    height: 30px;
    color: var(--primary);
}

.ipje-description {
    color: var(--muted);
    margin: 0 0 26px;
    font-size: 15px;
}

.ipje-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
}

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

.ipje-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px auto;
    align-items: end;
    gap: 14px;
}

.ipje-field {
    min-width: 0;
}

.ipje-field label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
}

.ipje-input,
.ipje-select {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.ipje-input:focus,
.ipje-select:focus {
    border-color: var(--primary);
}

.ipje-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 22px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #202020;
    font-weight: 700;
    white-space: nowrap;
}

.ipje-button:hover {
    background: var(--primary-hover);
}

.ipje-record-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.ipje-record {
    background: var(--surface-alt);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
}

.ipje-record:hover {
    border-color: var(--primary);
    color: var(--primary-text);
}

.ipje-record.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #202020;
}

.ipje-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.ipje-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ipje-table th,
.ipje-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    overflow-wrap: anywhere;
}

.ipje-table th {
    background: var(--table-header);
    font-weight: 600;
}

.ipje-table tr:last-child td {
    border-bottom: 0;
}

.ipje-table tbody tr:hover {
    background: var(--surface-alt);
}

.ipje-success {
    color: var(--success);
}

.ipje-danger {
    color: var(--danger);
}

.ipje-muted {
    color: var(--muted);
}

.ipje-map {
    height: 440px;
    background: var(--map-water);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.ipje-footer {
    text-align: center;
    padding: 30px 20px;
    font-size: 13px;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

.ipje-footer a {
    font-weight: 600;
}

@media (max-width: 900px) {
    .ipje-nav {
        flex-wrap: wrap;
        gap: 14px;
    }

    .ipje-menu {
        order: 3;
        width: 100%;
    }

    .ipje-form {
        grid-template-columns: 1fr 1fr;
    }

    .ipje-form .ipje-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .ipje-container {
        margin: 24px auto;
        padding: 0 14px;
    }

    .ipje-card {
        padding: 16px;
    }

    .ipje-form {
        grid-template-columns: 1fr;
    }

    .ipje-page-title {
        font-size: 24px;
    }

    .ipje-menu a {
        font-size: 12px;
        padding: 7px 9px;
    }

    .ipje-map {
        height: 300px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* IPje.nl Central Layout */

body {
    display: flex;
    flex-direction: column;
}

main.ipje-container {
    flex: 1 0 auto;
}

.ipje-header,
.ipje-footer {
    flex-shrink: 0;
}

.ipje-footer {
    background: var(--surface);
}

.ipje-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.ipje-footer-brand img {
    display: block;
    margin: 0 auto 12px;
    height: auto;
}

.ipje-footer-brand p {
    margin: 0 0 18px;
}

.ipje-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 22px;
    margin-bottom: 24px;
}

.ipje-footer-links a {
    color: var(--muted);
    font-size: 13px;
}

.ipje-footer-links a:hover {
    color: var(--primary-text);
}

.ipje-footer-copyright {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    font-size: 12px;
}

@media (max-width: 600px) {
    .ipje-footer-links {
        gap: 10px 16px;
    }
}

/* DNS Lookup v1.0.0 */

.ipje-button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.ipje-record-option {
    position: relative;
    cursor: pointer;
}

.ipje-record-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.ipje-record-option .ipje-record {
    display: block;
}

.ipje-record-option input:checked + span {
    background: var(--primary);
    border-color: var(--primary);
    color: #202020;
}

.ipje-record-option input:focus-visible + span {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.ipje-turnstile {
    margin-top: 20px;
}

.ipje-turnstile p {
    margin: 6px 0 0;
    font-size: 12px;
}

.ipje-alert {
    padding: 16px 20px;
    border: 1px solid var(--danger);
    border-radius: 8px;
    color: var(--danger);
    background: var(--surface);
    margin-bottom: 24px;
}

.ipje-result {
    padding: 20px 0;
    border-top: 1px solid var(--border);
}

.ipje-result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ipje-result-heading h3 {
    margin: 0;
    font-size: 17px;
}

.ipje-result-heading span {
    font-size: 12px;
    font-weight: 600;
}

.ipje-result-meta {
    color: var(--muted);
    font-size: 12px;
    margin: 8px 0 14px;
}

.ipje-record-value {
    font-family: monospace;
    font-size: 13px;
    min-width: 180px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ipje-copy {
    background: var(--surface-alt);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
}

.ipje-copy:hover {
    color: var(--primary-text);
    border-color: var(--primary);
}

/* DNS Table Improvements v1.1.0 */

:root {
    --dns-table-header: #F0F0F0;
    --dns-table-hover: #FAFAFA;
}

html[data-theme="dark"] {
    --dns-table-header: #292929;
    --dns-table-hover: #252525;
}

.ipje-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
}

.ipje-table {
    width: 100%;
    min-width: 650px;
    table-layout: auto;
    border-collapse: collapse;
}

.ipje-table thead th {
    background: var(--dns-table-header);
    color: var(--text);
    border-bottom: 2px solid #FF7F00;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    padding: 13px 14px;
}

.ipje-table td {
    padding: 14px;
    vertical-align: middle;
    font-size: 13px;
}

.ipje-table th:nth-child(1),
.ipje-table td:nth-child(1) {
    min-width: 140px;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

.ipje-table th:nth-child(2),
.ipje-table td:nth-child(2) {
    width: 75px;
    min-width: 75px;
    white-space: nowrap;
    word-break: normal;
}

.ipje-table th:nth-child(3),
.ipje-table td:nth-child(3) {
    width: 70px;
    min-width: 70px;
    white-space: nowrap;
    word-break: normal;
    font-variant-numeric: tabular-nums;
}

.ipje-table th:nth-child(4),
.ipje-table td:nth-child(4) {
    width: 100%;
    min-width: 240px;
}

.ipje-table th:last-child,
.ipje-table td:last-child {
    width: 65px;
    min-width: 65px;
    text-align: center;
    white-space: nowrap;
}

.ipje-table td.ipje-record-value {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.7;
}

.ipje-table tbody tr:hover {
    background: var(--dns-table-hover);
}

.ipje-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 7px;
    white-space: nowrap;
    cursor: pointer;
}

.ipje-copy svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.ipje-copy:hover {
    color: #FF7F00;
    border-color: #FF7F00;
}


/* IPje.nl Dropdown & DNS Status Badges v2.0.2 */

:root {
    --badge-success-bg: #EAF7EF;
    --badge-success-border: #B7E3C6;
    --badge-success-text: #18743B;

    --badge-error-bg: #FDECEC;
    --badge-error-border: #F1BABA;
    --badge-error-text: #B42318;

    --badge-neutral-bg: #F0F0F0;
    --badge-neutral-border: #DDDDDD;
    --badge-neutral-text: #666666;
}

html[data-theme="dark"] {
    --badge-success-bg: #163324;
    --badge-success-border: #285C3D;
    --badge-success-text: #6DDB98;

    --badge-error-bg: #3B2020;
    --badge-error-border: #733737;
    --badge-error-text: #FF9292;

    --badge-neutral-bg: #292929;
    --badge-neutral-border: #444444;
    --badge-neutral-text: #BBBBBB;
}

.ipje-select[hidden],
.ipje-dropdown-menu[hidden] {
    display: none !important;
}

.ipje-dropdown {
    position: relative;
    width: 100%;
    min-width: 0;
}

.ipje-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: left;
}

.ipje-dropdown-trigger:hover,
.ipje-dropdown-trigger[aria-expanded="true"] {
    border-color: var(--primary);
}

.ipje-dropdown-arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -4px;
    flex-shrink: 0;
}

.ipje-dropdown-trigger[aria-expanded="true"]
.ipje-dropdown-arrow {
    transform: rotate(225deg);
    margin-top: 4px;
}

.ipje-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 100;
    padding: 5px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

.ipje-dropdown-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--text);
    text-align: left;
    font-size: 14px;
}

.ipje-dropdown-option.is-selected {
    color: var(--primary-text);
    font-weight: 600;
    background: var(--surface-alt);
}

.ipje-dropdown-option.is-selected::after {
    content: "\2713";
    margin-left: 8px;
}

.ipje-dropdown-option:hover,
.ipje-dropdown-option:focus-visible {
    background: #FF7F00;
    color: #202020;
    outline: none;
}

.ipje-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 11px;
    border: 1px solid;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    flex-shrink: 0;
}

.ipje-status-badge svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.ipje-status-badge.is-success {
    background: var(--badge-success-bg);
    border-color: var(--badge-success-border);
    color: var(--badge-success-text);
}

.ipje-status-badge.is-error {
    background: var(--badge-error-bg);
    border-color: var(--badge-error-border);
    color: var(--badge-error-text);
}

.ipje-status-badge.is-neutral {
    background: var(--badge-neutral-bg);
    border-color: var(--badge-neutral-border);
    color: var(--badge-neutral-text);
}


/* IPje.nl Status Badge Fix v2.0.3 */

.ipje-status-badge {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 5px 10px !important;
    border: 1px solid !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 18px !important;
    white-space: nowrap !important;
    width: auto !important;
    height: auto !important;
    flex-shrink: 0 !important;
}

.ipje-status-badge svg {
    display: inline-block !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    max-width: 14px !important;
    flex: 0 0 14px !important;
    margin: 0 !important;
}

/* Light Mode */

.ipje-status-badge.is-success {
    background: #EAF7EF !important;
    border-color: #B7E3C6 !important;
    color: #18743B !important;
}

.ipje-status-badge.is-error {
    background: #FDECEC !important;
    border-color: #F1BABA !important;
    color: #B42318 !important;
}

.ipje-status-badge.is-neutral {
    background: #F0F0F0 !important;
    border-color: #DDDDDD !important;
    color: #666666 !important;
}

/* Dark Mode */

html[data-theme="dark"] .ipje-status-badge.is-success {
    background: #163324 !important;
    border-color: #285C3D !important;
    color: #6DDB98 !important;
}

html[data-theme="dark"] .ipje-status-badge.is-error {
    background: #3B2020 !important;
    border-color: #733737 !important;
    color: #FF9292 !important;
}

html[data-theme="dark"] .ipje-status-badge.is-neutral {
    background: #292929 !important;
    border-color: #444444 !important;
    color: #BBBBBB !important;
}


/* IPje.nl Calculator v2.0.4 */

.ipje-calculator {
    max-width: 760px;
    margin: 0 auto;
}

.ipje-calculator-heading {
    margin-bottom: 24px;
}

.ipje-calculator-heading h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 28px;
}

.ipje-calculator-heading svg {
    width: 26px;
    height: 26px;
    color: var(--primary);
    flex-shrink: 0;
}

.ipje-calculator-heading p {
    color: var(--muted);
    margin: 6px 0 0;
}

.ipje-calculator-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}

.ipje-calculator-card h2 {
    margin: 0 0 20px;
    font-size: 18px;
}

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

.ipje-calculator-field {
    min-width: 0;
}

.ipje-calculator-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 7px;
}

.ipje-calculator-field input {
    width: 100%;
    padding: 11px 14px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.ipje-calculator-field input:focus {
    border-color: var(--primary);
}

.ipje-calculator-rates {
    display: flex;
    gap: 8px;
    margin: 10px 0 20px;
}

.ipje-calculator-rates button {
    background: var(--surface-alt);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 600;
}

.ipje-calculator-rates button:hover,
.ipje-calculator-rates button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #202020;
}

.ipje-calculator-result {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-top: 20px;
}

.ipje-calculator-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 9px 0;
}

.ipje-calculator-result-row span {
    color: var(--muted);
    font-size: 14px;
}

.ipje-calculator-result-row strong {
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.ipje-calculator-total {
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 16px;
}

.ipje-calculator-total strong {
    color: var(--primary-text);
    font-size: 24px;
}

@media (max-width: 600px) {
    .ipje-calculator-fields {
        grid-template-columns: 1fr;
    }

    .ipje-calculator-card {
        padding: 18px;
    }

    .ipje-calculator-heading h1 {
        font-size: 22px;
    }
}



/* IPje.nl Final Navigation v2.0.8 */

.ipje-menu a {
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    box-shadow: none !important;
    color: #444444;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .18s ease,
                color .18s ease;
}

.ipje-menu a.active,
.ipje-menu a[aria-current="page"] {
    background: #333333;
    color: #ffffff;
    box-shadow: none !important;
}

[data-theme="dark"] .ipje-menu a {
    color: #d4d4d4;
}

[data-theme="dark"] .ipje-menu a.active,
[data-theme="dark"] .ipje-menu a[aria-current="page"] {
    background: #e5e5e5;
    color: #171717;
}

.ipje-menu a:hover,
.ipje-menu a.active:hover,
.ipje-menu a[aria-current="page"]:hover,
[data-theme="dark"] .ipje-menu a:hover,
[data-theme="dark"] .ipje-menu a.active:hover,
[data-theme="dark"] .ipje-menu a[aria-current="page"]:hover {
    background: #ff7f00;
    color: #171717;
    text-decoration: none;
}

.ipje-menu a:focus-visible {
    outline: 2px solid #ff7f00;
    outline-offset: 3px;
}

@media (max-width: 700px) {
    .ipje-menu a {
        padding: 7px 9px;
        font-size: 12px;
    }
}

/* IPje.nl Language Switcher v2.1.0 */

.ipje-language {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    flex-shrink: 0;
}

.ipje-language a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 7px 8px;
    border-radius: 5px;
    color: #444444;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .18s ease,
                color .18s ease;
}

.ipje-language a.active {
    background: #333333;
    color: #ffffff;
}

[data-theme="dark"] .ipje-language a {
    color: #d4d4d4;
}

[data-theme="dark"] .ipje-language a.active {
    background: #e5e5e5;
    color: #171717;
}

.ipje-language a:hover,
.ipje-language a.active:hover,
[data-theme="dark"] .ipje-language a:hover,
[data-theme="dark"] .ipje-language a.active:hover {
    background: #ff7f00;
    color: #171717;
    text-decoration: none;
}

.ipje-language a:focus-visible {
    outline: 2px solid #ff7f00;
    outline-offset: 2px;
}
