/* What Is My IP Address - DevSuite Utility Styles */

.ip-utility-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem 1.5rem;
    width: 100%;
}

/* Hero Section */
.ip-hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    background-image: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
}

[data-theme="dark"] .ip-hero-card {
    background-image: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 40%);
}

.ip-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

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

.ip-hero-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.ip-hero-icon svg {
    width: 24px;
    height: 24px;
}

.ip-hero-subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.ip-hero-title {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

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

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.status-pill.success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.25);
}

.status-pill.warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.25);
}

.status-pill.info {
    background: rgba(6, 182, 212, 0.12);
    color: #06b6d4;
    border-color: rgba(6, 182, 212, 0.25);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
    box-shadow: 0 0 0 0 currentColor;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Primary IP Display */
.ip-display-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .ip-display-grid {
        grid-template-columns: 1.3fr 1fr;
    }
}

.primary-ip-box {
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
}

[data-theme="dark"] .primary-ip-box {
    background: rgba(15, 23, 42, 0.4);
}

.ip-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ip-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ip-main-address-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ip-address-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    word-break: break-all;
    line-height: 1.15;
}

.ip-action-btns {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.btn-ip-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn-ip-action:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.btn-ip-action.primary {
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    border: none;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-ip-action.primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.4);
}

.btn-ip-action svg {
    width: 16px;
    height: 16px;
}

/* Secondary Quick Metrics */
.quick-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

.meta-box {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

[data-theme="dark"] .meta-box {
    background: rgba(15, 23, 42, 0.3);
}

.meta-box-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.meta-box-val {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Nav Tabs */
.ip-tabs-nav {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    scrollbar-width: thin;
}

.ip-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.ip-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.05);
}

.ip-tab-btn.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.25);
}

.ip-tab-btn svg {
    width: 18px;
    height: 18px;
}

/* Tab Content Panes */
.ip-tab-pane {
    display: none;
    animation: fadeIn 0.25s ease-in-out;
}

.ip-tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Details Grid */
.ip-section-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 992px) {
    .ip-section-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.ip-card-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.panel-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

/* Info Key-Value Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table tr {
    border-bottom: 1px solid rgba(226, 232, 240, 0.4);
}

[data-theme="dark"] .data-table tr {
    border-bottom: 1px solid rgba(30, 41, 59, 0.6);
}

.data-table tr:last-child {
    border-bottom: none;
}

.data-table th, .data-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
    text-align: left;
}

.data-table th {
    color: var(--text-secondary);
    font-weight: 500;
    width: 38%;
}

.data-table td {
    color: var(--text-primary);
    font-weight: 600;
    word-break: break-all;
}

.mono-tag {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
    background: rgba(99, 102, 241, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    color: var(--primary);
}

/* Map Container */
.map-container-wrap {
    height: 320px;
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
    margin-top: 1rem;
    z-index: 1;
}

#ipGeoMap, #lookupGeoMap {
    height: 100%;
    width: 100%;
}

/* Search / Lookup Tool */
.lookup-form-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.lookup-input-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.lookup-input {
    flex: 1;
    min-width: 250px;
    padding: 0.85rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1rem;
    background: var(--textarea-bg);
    color: var(--textarea-color);
    transition: var(--transition);
}

.lookup-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.lookup-btn {
    padding: 0.85rem 1.75rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.lookup-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.preset-chips {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.preset-chip-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.chip-btn {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-family: ui-monospace, monospace;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.chip-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Privacy & Leak Test Styles */
.leak-score-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.score-number {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #10b981;
    line-height: 1;
}

.leak-check-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.leak-check-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.leak-status-badge {
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
}

.badge-secure {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.badge-exposed {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* CIDR & Subnet Calculator */
.subnet-calc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .subnet-calc-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.calc-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.calc-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.calc-input, .calc-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--textarea-bg);
    color: var(--textarea-color);
    font-family: ui-monospace, monospace;
    font-size: 0.95rem;
}

/* Latency Ping Cards */
.ping-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.ping-card {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
}

[data-theme="dark"] .ping-card {
    background: rgba(15, 23, 42, 0.3);
}

.ping-val {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: ui-monospace, monospace;
    color: var(--primary);
    margin: 0.4rem 0;
}

/* Tool Toast */
.copy-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #0f172a;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}

.copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Marker Styling for Leaflet */
.leaflet-popup-content-wrapper {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-radius: 10px !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow) !important;
}

.leaflet-popup-tip {
    background: var(--bg-card) !important;
}

/* SEO Info Section & Feature Cards */
.info-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    box-shadow: var(--shadow);
    margin-top: 2.5rem;
    margin-bottom: 2rem;
}

.info-section h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.info-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.info-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition);
}

[data-theme="dark"] .feature-card {
    background: rgba(15, 23, 42, 0.35);
}

.feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.feature-icon-wrapper {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon-wrapper svg {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    display: block;
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.feature-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* FAQ Accordion Styling */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1rem;
}

.faq-item {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

[data-theme="dark"] .faq-item {
    background: rgba(15, 23, 42, 0.3);
}

.faq-question {
    padding: 1.1rem 1.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.faq-icon {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    display: none;
    padding: 0 1.25rem 1.25rem 1.25rem;
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.faq-item.active .faq-answer {
    display: block;
}
