/* =================================================
   Tellaw My IP — tous les sélecteurs scopés
   sous .tellaw-my-ip pour éviter tout conflit.
   ================================================= */

/* ---- Racine ---- */
.tellaw-my-ip {
    font-family: 'Consolas', 'Monaco', 'Menlo', 'Courier New', monospace;
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: 10px;
    border: 1px solid #313244;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    box-sizing: border-box;
}

/* ---- Header ---- */
.tellaw-my-ip .mip-header {
    background: #181825;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #313244;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
}

.tellaw-my-ip .mip-header-icon { font-size: 1rem; flex-shrink: 0; }

.tellaw-my-ip .mip-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #94e2d5;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}

.tellaw-my-ip .mip-header-hint {
    margin-left: auto;
    font-size: 0.72rem;
    color: #45475a;
}

/* ---- Bloc IP ---- */
.tellaw-my-ip .mip-ip-section {
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid #313244;
    background: #181825;
}

.tellaw-my-ip .mip-ip-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #585b70;
    margin: 0 0 0.75rem;
    padding: 0;
    border: none;
    background: none;
}

/* ---- Dual IP cards ---- */
.tellaw-my-ip .mip-ip-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.tellaw-my-ip .mip-ip-card {
    background: #12111d;
    border: 1px solid #313244;
    border-radius: 8px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tellaw-my-ip .mip-ip-card-head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tellaw-my-ip .mip-ip-version-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.12rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tellaw-my-ip .mip-v4-badge { background: rgba(148,226,213,0.15); color: #94e2d5; border: 1px solid rgba(148,226,213,0.3); }
.tellaw-my-ip .mip-v6-badge { background: rgba(203,166,247,0.15); color: #cba6f7; border: 1px solid rgba(203,166,247,0.3); }

.tellaw-my-ip .mip-ip-card-body {
    min-height: 2.2rem;
    display: flex;
    align-items: center;
}

.tellaw-my-ip .mip-ip-loading-sm {
    display: flex;
    align-items: center;
}

.tellaw-my-ip .mip-spinner-sm {
    width: 0.9rem;
    height: 0.9rem;
    border: 2px solid #313244;
    border-top-color: #94e2d5;
    border-radius: 50%;
    animation: tellaw-mip-spin 0.7s linear infinite;
}

.tellaw-my-ip .mip-ip-addr {
    font-size: clamp(0.88rem, 2.5vw, 1.15rem);
    font-weight: 700;
    color: #94e2d5;
    letter-spacing: 0.01em;
    line-height: 1.3;
    word-break: break-all;
}

.tellaw-my-ip .mip-ip-card:nth-child(2) .mip-ip-addr {
    color: #cba6f7;
}

.tellaw-my-ip .mip-ip-unavail {
    font-size: 0.78rem;
    color: #45475a;
    font-style: italic;
}

.tellaw-my-ip .mip-ip-card-foot { }

/* ---- IP vue par le serveur ---- */
.tellaw-my-ip .mip-server-ip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    background: rgba(49,50,68,0.4);
    border-radius: 6px;
    font-size: 0.74rem;
}

.tellaw-my-ip .mip-server-ip-label {
    color: #45475a;
}

.tellaw-my-ip .mip-server-ip-val {
    color: #6c7086;
    font-weight: 600;
}

.tellaw-my-ip .mip-btn {
    padding: 0.3rem 0.75rem;
    border-radius: 5px;
    border: none;
    font-size: 0.73rem;
    font-family: 'Consolas', 'Monaco', 'Menlo', monospace;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    margin: 0;
    line-height: 1.4;
    background: #313244;
    color: #cdd6f4;
    display: inline-block;
    text-decoration: none;
}

.tellaw-my-ip .mip-copy-btn:hover { background: #45475a; }

.tellaw-my-ip .mip-meta-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    margin: 0;
    border: 1px solid transparent;
    line-height: 1.5;
}

.tellaw-my-ip .mip-badge-version { background: rgba(148,226,213,0.1); color: #94e2d5; border-color: rgba(148,226,213,0.3); }
.tellaw-my-ip .mip-badge-ok      { background: rgba(166,227,161,0.1); color: #a6e3a1; border-color: rgba(166,227,161,0.3); }
.tellaw-my-ip .mip-badge-warn    { background: rgba(250,179,135,0.1); color: #fab387; border-color: rgba(250,179,135,0.3); }

/* ---- Grille ---- */
.tellaw-my-ip .mip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0;
    border-bottom: 1px solid #313244;
}

.tellaw-my-ip .mip-card {
    padding: 1rem 1.25rem;
    border-right: 1px solid #313244;
}

.tellaw-my-ip .mip-card:last-child { border-right: none; }

.tellaw-my-ip .mip-card-title {
    font-size: 0.71rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #585b70;
    margin: 0 0 0.65rem;
    padding: 0;
    border: none;
    background: none;
}

/* ---- Info list (clé / valeur) ---- */
.tellaw-my-ip .mip-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tellaw-my-ip .mip-info-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.5;
    flex-wrap: wrap;
}

.tellaw-my-ip .mip-info-key {
    color: #585b70;
    min-width: 90px;
    flex-shrink: 0;
    font-size: 0.75rem;
}

.tellaw-my-ip .mip-info-val {
    color: #cdd6f4;
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.tellaw-my-ip .mip-val-ok   { color: #a6e3a1; }
.tellaw-my-ip .mip-val-warn { color: #fab387; }
.tellaw-my-ip .mip-val-muted { color: #585b70; }
.tellaw-my-ip .mip-val-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
    display: block;
}

/* ---- Sections génériques ---- */
.tellaw-my-ip .mip-section {
    border-top: 1px solid #313244;
}

.tellaw-my-ip .mip-section-title {
    padding: 0.55rem 1.25rem;
    font-size: 0.71rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #585b70;
    background: #181825;
    border-bottom: 1px solid #313244;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tellaw-my-ip .mip-collapsible {
    cursor: pointer;
    user-select: none;
    transition: color 0.15s;
}

.tellaw-my-ip .mip-collapsible:hover { color: #cdd6f4; }

.tellaw-my-ip .mip-caret {
    margin-left: auto;
    font-size: 0.6rem;
    color: #45475a;
}

.tellaw-my-ip .mip-count-badge {
    background: #313244;
    color: #6c7086;
    font-size: 0.65rem;
    padding: 0.08rem 0.38rem;
    border-radius: 10px;
    font-weight: 700;
}

/* ---- Géolocalisation ---- */
.tellaw-my-ip .mip-geo-section { }

.tellaw-my-ip .mip-geo-inner {
    padding: 0.85rem 1.25rem 0.5rem;
}

.tellaw-my-ip .mip-geo-loading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.8rem;
    color: #6c7086;
}

.tellaw-my-ip .mip-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid #313244;
    border-top-color: #94e2d5;
    border-radius: 50%;
    animation: tellaw-mip-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes tellaw-mip-spin {
    to { transform: rotate(360deg); }
}

.tellaw-my-ip .mip-geo-data {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tellaw-my-ip .mip-geo-error {
    font-size: 0.78rem;
    color: #585b70;
    font-style: italic;
}

.tellaw-my-ip .mip-geo-note {
    font-size: 0.7rem;
    color: #45475a;
    margin: 0.3rem 0 0.75rem;
    padding: 0 1.25rem;
    border: none;
    background: none;
    line-height: 1.4;
}

/* ---- Langues ---- */
.tellaw-my-ip .mip-lang-tags {
    padding: 0.7rem 1.25rem 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tellaw-my-ip .mip-lang-tag {
    background: #313244;
    color: #94e2d5;
    font-size: 0.76rem;
    padding: 0.18rem 0.6rem;
    border-radius: 20px;
    border: 1px solid rgba(148,226,213,0.2);
    line-height: 1.5;
}

/* ---- User-Agent ---- */
.tellaw-my-ip .mip-ua-string {
    padding: 0.75rem 1.25rem 0.9rem;
    font-size: 0.74rem;
    color: #6c7086;
    line-height: 1.6;
    word-break: break-all;
    font-family: 'Consolas', 'Monaco', 'Menlo', monospace;
}

/* ---- Headers list ---- */
.tellaw-my-ip .mip-headers-body {
    padding: 0.5rem 1.25rem 0.85rem;
    max-height: 300px;
    overflow-y: auto;
}

.tellaw-my-ip .mip-headers-body::-webkit-scrollbar       { width: 5px; }
.tellaw-my-ip .mip-headers-body::-webkit-scrollbar-track { background: #181825; }
.tellaw-my-ip .mip-headers-body::-webkit-scrollbar-thumb { background: #45475a; border-radius: 3px; }

.tellaw-my-ip .mip-hdr-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    font-size: 0.78rem;
    line-height: 1.6;
    padding: 0.15rem 0;
    border-bottom: 1px solid #181825;
    flex-wrap: wrap;
}

.tellaw-my-ip .mip-hdr-row:last-child { border-bottom: none; }

.tellaw-my-ip .mip-hdr-key {
    color: #94e2d5;
    width: 200px;
    min-width: 200px;
    flex-shrink: 0;
    word-break: break-word;
}

.tellaw-my-ip .mip-hdr-val {
    color: #a6adc8;
    flex: 1;
    word-break: break-word;
}

/* ---- Responsive ---- */
@media (max-width: 560px) {
    .tellaw-my-ip .mip-ip-dual   { grid-template-columns: 1fr; }
    .tellaw-my-ip .mip-grid      { grid-template-columns: 1fr; }
    .tellaw-my-ip .mip-card      { border-right: none; border-bottom: 1px solid #313244; }
    .tellaw-my-ip .mip-card:last-child { border-bottom: none; }
    .tellaw-my-ip .mip-hdr-key   { width: auto; min-width: 0; }
    .tellaw-my-ip .mip-hdr-row   { flex-direction: column; gap: 0; }
    .tellaw-my-ip .mip-header-hint { display: none; }
    .tellaw-my-ip .mip-val-truncate { max-width: 100%; }
}
