/* ==========================================================================
   ToolSphare IP Location Checker & Geolocation Engine
   Ultra-Premium Modern Dark Theme & 100% Responsive Grid
   ========================================================================== */

/* --- Full-Width Canvas Overrides for Immersive Experience --- */
body:has(#IpLocationApp),
html:has(#IpLocationApp) {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

.tool-page:has(#IpLocationApp),
.tool-page:has(.ip-tool),
.tool-page.tool-page-immersive {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.tool-page:has(#IpLocationApp) .container.tool-layout,
.tool-layout:has(#IpLocationApp),
.tool-layout:has(.ip-tool),
.tool-layout.tool-layout-immersive {
    display: block !important;
    grid-template-columns: 100% !important;
    max-width: 1260px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    box-sizing: border-box !important;
}

.tool-layout:has(#IpLocationApp)>.tool-sidebar,
.tool-layout:has(.ip-tool)>.tool-sidebar,
.tool-layout.tool-layout-immersive>.tool-sidebar {
    display: none !important;
}

.tool-main:has(#IpLocationApp),
.tool-main:has(.ip-tool),
.tool-main.tool-main-full {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Universal Hidden Display Override: Ensures hidden state is never overridden by flex */
[hidden],
[hidden="hidden"],
.ip-tool [hidden],
.ip-alert-box[hidden],
.ip-loading-overlay[hidden],
.ip-ping-result[hidden],
.ip-clear-btn[hidden] {
    display: none !important;
}

/* AdBlocker Defensive Collapse */
html.adblock-active .ad-slot,
html.adblock-active .adsbygoogle,
html.adblock-active [class*="ad-container"] {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tool-widget:has(#IpLocationApp),
.tool-widget:has(.ip-tool),
.tool-widget.tool-widget-frameless {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin-bottom: 2.5rem !important;
}

/* Base Component Wrapper */
.ip-tool {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    color: #e2e8f0;
    box-sizing: border-box;
    font-family: inherit;
}

/* --- Control & Telemetry Bar --- */
.ip-control-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 1rem;
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
}

.ip-control-bar::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.08), transparent 70%);
    pointer-events: none;
}

.ip-control-status {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: relative;
    z-index: 1;
}

.ip-status-caption {
    font-size: 0.84rem;
    color: #94a3b8;
    line-height: 1.4;
}

.ip-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.28rem 0.75rem;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.35);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
}

.ip-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #38bdf8;
    box-shadow: 0 0 10px #38bdf8;
    animation: ipPulseAnim 1.8s infinite ease-in-out;
}

@keyframes ipPulseAnim {

    0%,
    100% {
        transform: scale(0.85);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.35);
        opacity: 1;
        box-shadow: 0 0 16px #38bdf8;
    }
}

.ip-control-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}


/* --- Buttons --- */
.ip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.7rem 1.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}

.ip-btn:hover {
    transform: translateY(-2px);
}

.ip-btn:active {
    transform: translateY(0);
}

.ip-btn-primary {
    background: linear-gradient(135deg, #0284c7, #06b6d4);
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
}

.ip-btn-primary:hover {
    background: linear-gradient(135deg, #0369a1, #0891b2);
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.5);
    color: #ffffff !important;
}

.ip-btn-locate {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399 !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.ip-btn-locate:hover {
    background: rgba(16, 185, 129, 0.22);
    border-color: #34d399;
    color: #6ee7b7 !important;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.2);
}

.ip-radar-ring {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: ipPulseAnim 2s infinite ease-in-out;
}

.ip-btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    background: rgba(30, 41, 59, 0.8);
    color: #cbd5e1 !important;
    border: 1px solid rgba(71, 85, 105, 0.7);
    border-radius: 0.5rem;
}

.ip-btn-sm:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: #38bdf8;
    color: #f8fafc !important;
}

.ip-btn-outline {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(71, 85, 105, 0.8);
    color: #cbd5e1 !important;
    border-radius: 0.625rem;
}

.ip-btn-outline:hover {
    background: rgba(51, 65, 85, 0.85);
    border-color: #38bdf8;
    color: #ffffff !important;
}

/* --- Search Toolbar --- */
.ip-toolbar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 1.125rem;
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.4);
}

.ip-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    width: 100%;
}

.ip-input-wrap {
    flex: 1 1 300px;
    position: relative;
    display: flex;
    align-items: center;
}

.ip-input-icon {
    position: absolute;
    left: 1.1rem;
    color: #64748b;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.ip-input-wrap input {
    width: 100%;
    padding: 0.85rem 2.75rem 0.85rem 3rem;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(71, 85, 105, 0.8);
    border-radius: 0.75rem;
    font-size: 0.98rem;
    color: #f8fafc;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.ip-input-wrap input:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
    background: rgba(30, 41, 59, 1);
}

.ip-clear-btn {
    position: absolute;
    right: 0.85rem;
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 50%;
}

.ip-clear-btn[hidden],
.ip-clear-btn.is-hidden {
    display: none !important;
}

.ip-clear-btn:hover {
    color: #f8fafc;
}

.ip-search-actions {
    display: flex;
    align-items: center;
}

/* Quick Chips */
.ip-quick-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.ip-chips-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ip-chip {
    padding: 0.4rem 0.85rem;
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(71, 85, 105, 0.6);
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
}

.ip-chip:hover {
    background: rgba(51, 65, 85, 0.9);
    border-color: #38bdf8;
    color: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}

.ip-chip.is-my-ip {
    border-color: rgba(16, 185, 129, 0.45);
    color: #34d399;
    background: rgba(16, 185, 129, 0.1);
}

.ip-chip.is-my-ip:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #34d399;
    color: #6ee7b7;
}

/* Alert Banner */
.ip-alert-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 0.875rem;
    font-size: 0.9rem;
}

.ip-alert-box[hidden],
.ip-alert-box.is-hidden {
    display: none !important;
}

.ip-alert-box.is-error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.ip-alert-box.is-success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

/* Loading Overlay */
.ip-loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px dashed rgba(71, 85, 105, 0.5);
    border-radius: 1.125rem;
    gap: 0.85rem;
}

.ip-loading-overlay[hidden],
.ip-loading-overlay.is-hidden {
    display: none !important;
}

.ip-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(56, 189, 248, 0.2);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: ipSpin 0.75s linear infinite;
}

@keyframes ipSpin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Results Container --- */
.ip-results-wrap {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Overview Stat Cards Grid */
.ip-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.125rem;
}

@media (max-width: 1024px) {
    .ip-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ip-cards-grid {
        grid-template-columns: 1fr;
    }
}

.ip-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.85));
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 1rem;
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.ip-card:hover {
    border-color: rgba(56, 189, 248, 0.45);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.45);
}

.ip-card-highlight {
    border-color: rgba(56, 189, 248, 0.35);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
}

.ip-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.ip-card-label {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.ip-card-main-val {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ip-card-main-val strong {
    font-size: 1.18rem;
    font-weight: 700;
    color: #f8fafc;
    word-break: break-all;
    line-height: 1.3;
}

.ip-address-display {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: #38bdf8 !important;
}

.ip-mini-copy-btn {
    background: rgba(51, 65, 85, 0.6);
    border: 1px solid rgba(71, 85, 105, 0.6);
    border-radius: 0.375rem;
    color: #cbd5e1;
    padding: 0.3rem 0.45rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: all 0.15s ease;
}

.ip-mini-copy-btn:hover {
    background: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    border-color: #38bdf8;
}

.ip-card-sub {
    font-size: 0.84rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

/* Badges */
.ip-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 0.375rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ip-badge-version {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}

.ip-badge-asn {
    background: rgba(147, 51, 234, 0.15);
    border: 1px solid rgba(147, 51, 234, 0.4);
    color: #c084fc;
}

.ip-badge-clean {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.ip-badge-warn {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.ip-badge-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.ip-country-flag {
    font-size: 1.5rem;
    line-height: 1;
}

/* --- Map Section --- */
.ip-map-section {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(51, 65, 85, 0.85);
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.4);
}

.ip-map-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.7);
    background: rgba(30, 41, 59, 0.7);
}

.ip-map-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ip-map-icon {
    font-size: 1.5rem;
}

.ip-map-title-wrap h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #f8fafc;
}

.ip-map-title-wrap p {
    margin: 0;
    font-size: 0.82rem;
    color: #94a3b8;
}

.ip-map-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.ip-map-container-wrap {
    position: relative;
    width: 100%;
}

.ip-leaflet-map {
    width: 100%;
    height: 420px;
    background: #090d16;
    z-index: 1;
}

/* Sleek dark mode styling for Leaflet OpenStreetMap tiles */
.ip-leaflet-map .leaflet-tile {
    filter: brightness(0.8) invert(1) contrast(2.8) hue-rotate(200deg) saturate(0.3);
}

.ip-map-coords-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: rgba(15, 23, 42, 0.98);
    border-top: 1px solid rgba(51, 65, 85, 0.75);
}

.ip-coord-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
}

.ip-coord-label {
    color: #94a3b8;
    font-weight: 500;
}

.ip-coord-val {
    color: #38bdf8;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-weight: 600;
}

/* --- Tabs Section --- */
.ip-tabs-section {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(51, 65, 85, 0.85);
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.35);
}

.ip-tabs-nav {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid rgba(51, 65, 85, 0.7);
    background: rgba(30, 41, 59, 0.6);
}

.ip-tabs-nav::-webkit-scrollbar {
    display: none;
}

.ip-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.95rem 1.4rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
}

.ip-tab-btn:hover {
    color: #e2e8f0;
    background: rgba(51, 65, 85, 0.35);
}

.ip-tab-btn.is-active {
    color: #38bdf8;
    border-bottom-color: #38bdf8;
    background: rgba(56, 189, 248, 0.08);
}

.ip-tab-panel {
    padding: 1.5rem;
}

.ip-grid-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.9rem;
}

.ip-data-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.85rem 1.15rem;
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(51, 65, 85, 0.65);
    border-radius: 0.75rem;
    transition: border-color 0.15s ease;
}

.ip-data-row:hover {
    border-color: rgba(56, 189, 248, 0.35);
}

.ip-field-name {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.ip-field-val {
    font-size: 0.95rem;
    color: #f1f5f9;
    word-break: break-all;
    line-height: 1.4;
}

.ip-field-val code {
    background: rgba(15, 23, 42, 0.8);
    padding: 0.2rem 0.5rem;
    border-radius: 0.375rem;
    font-family: 'SFMono-Regular', Consolas, monospace;
    color: #38bdf8;
    font-size: 0.88rem;
}

/* Status Pills */
.ip-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.ip-pill-clean {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.ip-pill-warn {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.ip-pill-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

/* Digital Clock Card */
.ip-time-box {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ip-digital-clock-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: radial-gradient(circle at center, rgba(30, 58, 138, 0.45), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(59, 130, 246, 0.45);
    border-radius: 1.125rem;
    text-align: center;
    box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.5);
}

.ip-clock-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #60a5fa;
    margin-bottom: 0.6rem;
}

.ip-digital-clock {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 3rem;
    font-weight: 800;
    color: #38bdf8;
    text-shadow: 0 0 24px rgba(56, 189, 248, 0.65);
    letter-spacing: 0.08em;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.ip-clock-date {
    font-size: 1.05rem;
    font-weight: 500;
    color: #cbd5e1;
    margin-bottom: 0.4rem;
}

.ip-clock-tz-name {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Subnet Panel */
.ip-subnet-calculator {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ip-calc-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
}

.ip-select {
    padding: 0.65rem 1.1rem;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(71, 85, 105, 0.85);
    border-radius: 0.625rem;
    color: #f8fafc;
    font-size: 0.92rem;
    font-family: inherit;
    cursor: pointer;
    flex: 1 1 260px;
}

.ip-select:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* Ping Test */
.ip-ping-box {
    padding: 1.25rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(51, 65, 85, 0.75);
    border-radius: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ip-ping-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.ip-ping-sub {
    display: block;
    font-size: 0.82rem;
    color: #94a3b8;
    margin-top: 0.2rem;
}

.ip-ping-result {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 0.625rem;
    font-size: 0.9rem;
}

.ip-ping-result[hidden],
.ip-ping-result.is-hidden {
    display: none !important;
}

.ip-ping-pill {
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}

/* --- Export Toolbar --- */
.ip-export-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.35rem 1.75rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 1.125rem;
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.35);
}

.ip-export-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ip-export-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* --- Mobile Responsiveness Adjustments --- */
@media (max-width: 768px) {
    .ip-control-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 1.1rem;
        gap: 0.85rem;
    }

    .ip-control-actions {
        width: 100%;
    }

    .ip-control-actions .ip-btn {
        width: 100%;
    }

    .ip-toolbar {
        padding: 1.15rem;
    }

    .ip-search-form {
        flex-direction: column;
    }

    .ip-search-actions {
        width: 100%;
    }

    .ip-search-actions .ip-btn {
        width: 100%;
    }

    .ip-leaflet-map {
        height: 300px;
    }

    .ip-map-coords-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem;
    }

    .ip-digital-clock {
        font-size: 2.2rem;
    }

    .ip-grid-details {
        grid-template-columns: 1fr;
    }

    .ip-export-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem;
    }

    .ip-export-actions {
        flex-direction: column;
        width: 100%;
    }

    .ip-export-actions .ip-btn {
        width: 100%;
    }
}