.nextweb1-d2ip {
    width: 100%;              /* full width of parent */
    max-width: 700px;         /* cap for large screens */
    margin: 20px auto;        /* center horizontally */
    padding: 15px;
    border: 1px solid #1e2a3a;
    border-radius: 6px;
    background: #0d1f33;      /* slightly lighter than #091825 for contrast */
    color: #f0f4f8;           /* light text for readability */
    box-sizing: border-box;   /* include padding/border in width */
}

.nextweb1-d2ip label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: #ffffff;
}

.nextweb1-d2ip input {
    width: 100%;
    padding: 8px;
    border: 1px solid #334155;
    border-radius: 4px;
    background: #091825;
    color: #ffffff !important; /* force white text */
}

.nextweb1-d2ip input::placeholder {
    color: #94a3b8;
}

/* Keep text white when focused or active */
.nextweb1-d2ip input:focus,
.nextweb1-d2ip input:active {
    color: #ffffff !important;
    background: #091825;
    outline: none;
}

/* Fix Chrome autofill yellow background & text color */
.nextweb1-d2ip input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px #091825 inset;
    -webkit-text-fill-color: #ffffff !important;
}

.d2ip-buttons {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.d2ip-buttons button {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
}

.d2ip-buttons button[value="convert"] { background: #0073aa; }
.d2ip-buttons button[value="sample"]  { background: #00a65a; }
.d2ip-buttons button[value="reset"]   { background: #d9534f; }

.d2ip-buttons button:hover { opacity: 0.9; }

/* Table wrapper for responsive scroll */
.table-wrapper {
    overflow-x: auto;
}

/* Keep the result table inside the container */
.d2ip-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    table-layout: auto; /* allow wrapping */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.d2ip-table th {
    background: #0073aa;
    color: #fff;
    padding: 8px;
    text-align: left;
}

.d2ip-table td {
    border: 1px solid #1e2a3a;
    padding: 8px;
    background: #0b1a2b;
    color: #f0f4f8;
    white-space: normal; /* allow wrapping */
}

/* Highlight preferred IP row */
.d2ip-table tr.preferred {
    background: #1e3a5f;
    color: #ffffff;
}

.d2ip-error {
    margin-top: 10px;
    padding: 8px;
    background: #5c2b2b;
    border: 1px solid #f5c6cb;
    color: #ffb3b3;
    border-radius: 4px;
}