/* InterDrop custom styles (Patches 3 & 5). Isolated from upstream PairDrop styles. */

/* Patch 5 — footer link to the blog */
.interdrop-blog-link {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: rgb(var(--text-color));
    opacity: 0.55;
    transition: opacity 0.12s ease, color 0.12s ease;
}

.interdrop-blog-link:hover {
    opacity: 1;
    color: #6366f1;
}

.interdrop-blog-link:focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
    opacity: 1;
}

/* InterDrop onboarding card (Patch 3). Isolated from upstream PairDrop styles. */

#interdrop-onboarding {
    --id-a: #6366f1;
    --id-b: #a855f7;

    box-sizing: border-box;
    position: relative;
    z-index: 3;
    width: min(92vw, 460px);
    margin: 10px auto;
    padding: 20px 20px 18px;
    text-align: left;
    border-radius: 16px;
    background: var(--bg-color-secondary);
    color: rgb(var(--text-color));
    border: 1px solid rgba(var(--text-color), 0.08);
    box-shadow: 0 12px 34px rgba(var(--text-color), 0.10);
    overflow: hidden;
}

/* Brand accent strip */
#interdrop-onboarding::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--id-a), var(--id-b));
}

.id-eyebrow {
    margin: 2px 0 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--id-a);
}

.id-title {
    margin: 5px 0 6px;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 700;
    color: rgb(var(--text-color));
}

.id-lead {
    margin: 0 0 13px;
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.78;
}

.id-pairs {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.id-pairs li {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 999px;
    white-space: nowrap;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.12));
    border: 1px solid rgba(168, 85, 247, 0.28);
}

.id-pairs li span {
    margin: 0 3px;
    font-weight: 700;
    color: var(--id-b);
}

.id-ways {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 16px;
    font-size: 12.5px;
    line-height: 1.45;
    opacity: 0.85;
}

.id-ways strong {
    color: rgb(var(--text-color));
}

.id-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.id-got-it {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    padding: 9px 20px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--id-a), var(--id-b));
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.id-later {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: rgb(var(--text-color));
    opacity: 0.6;
    padding: 9px 8px;
    border-radius: 10px;
    background: transparent;
    transition: opacity 0.12s ease;
}

.id-later:hover {
    opacity: 0.95;
}

.id-got-it:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}

.id-got-it:active {
    transform: translateY(0);
}

.id-dismiss {
    position: absolute;
    top: 9px;
    right: 11px;
    border: 0;
    cursor: pointer;
    background: transparent;
    color: rgb(var(--text-color));
    opacity: 0.45;
    font-size: 20px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 8px;
    transition: opacity 0.12s ease, background-color 0.12s ease;
}

.id-dismiss:hover {
    opacity: 0.9;
    background: rgba(var(--text-color), 0.08);
}

.id-got-it:focus-visible,
.id-later:focus-visible,
.id-dismiss:focus-visible {
    outline: 2px solid var(--id-b);
    outline-offset: 2px;
}

/* Hidden when dismissed within the last 7 days, or once peers are connected. */
#interdrop-onboarding.id-hidden,
x-peers:not(:empty) ~ #interdrop-onboarding {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .id-got-it,
    .id-dismiss {
        transition: none;
    }
    .id-got-it:hover {
        transform: none;
    }
}

/* WebRTC diagnostics (Patch 6) — visualises which WebRTC capabilities are blocked. */

.webrtc-diagnostics-title {
    margin: 6px 0 4px;
    width: 100%;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: left;
    opacity: 0.6;
}

.webrtc-diagnostics {
    list-style: none;
    width: 100%;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.webrtc-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    background: rgba(var(--text-color), 0.04);
    border: 1px solid rgba(var(--text-color), 0.08);
    transition: border-color 0.12s ease, background-color 0.12s ease;
}

.webrtc-check-label {
    font-weight: 600;
    color: rgb(var(--text-color));
}

.webrtc-check-status {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 3px 11px;
    border-radius: 999px;
    white-space: nowrap;
}

.webrtc-check[data-status="pending"] {
    opacity: 0.85;
}

.webrtc-check[data-status="pending"] .webrtc-check-status {
    color: rgb(var(--text-color));
    opacity: 0.65;
    background: rgba(var(--text-color), 0.10);
}

.webrtc-check[data-status="ok"] .webrtc-check-status {
    color: #0f7b3f;
    background: rgba(34, 197, 94, 0.16);
}

.webrtc-check[data-status="blocked"] {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.06);
}

.webrtc-check[data-status="blocked"] .webrtc-check-status {
    color: #b42318;
    background: rgba(239, 68, 68, 0.16);
}
