/* ==========================================================================
   results.css — shared result-box behaviour for email / username / phone
   Overflow safety (text never spills the box, any screen size), clickable
   links + embedded images in values, the site-matched download menu, status
   toasts. Additive: only augments each page's existing .widget / .info-item.
   ========================================================================== */

/* ---- Overflow safety: content never spills past its box ---- */
.widget { overflow: hidden; }
.widget .info { min-width: 0; }
.widget .info h2 {
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}
.info-item { min-width: 0; }
.info-item .key {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.info-item .value {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

/* ---- Clickable links inside result values ---- */
.info-item .value a {
    color: #e5564b;
    text-decoration: none;
    white-space: normal; /* beat the site-wide `a { white-space: nowrap }` so URLs wrap */
    overflow-wrap: anywhere;
    word-break: break-all;
}
.info-item .value a:hover { text-decoration: underline; }

/* ---- Embedded images inside result values ---- */
.info-item .value img,
.info-item .value .value-img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    border-radius: 8px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

/* ============ Download button + menu (matched to site: dark + vivrant red) ============ */
.tf-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px;
    background: transparent;
    color: #e5564b;
    border: 1px solid rgb(207 54 45);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.tf-dl-btn:hover { background: rgba(207, 54, 45, 0.12); }
.tf-dl-btn .chev { width: 12px; height: 12px; transition: transform 0.18s ease; }
.tf-dl-btn.open .chev { transform: rotate(180deg); }

.tf-dl-anchor { position: relative; }
.tf-dl-menu {
    display: none;
    position: absolute;
    top: 10px;
    right: 0;
    z-index: 1000;
    min-width: 240px;
    background: #09090b;
    border: 1px solid #292929;
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}
.tf-dl-menu.open { display: block; }
.tf-dl-title {
    font-size: 10.5px;
    color: #71717a;
    padding: 8px 10px;
    border-bottom: 1px solid #1f1f22;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
}
.tf-dl-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px;
    background: transparent;
    border: none;
    color: #fafafa;
    cursor: pointer;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    transition: background 0.12s ease;
}
.tf-dl-item:hover { background: #18181b; }
.tf-dl-item:disabled { opacity: 0.55; cursor: not-allowed; }
.tf-dl-item .ic { width: 16px; text-align: center; color: #e5564b; flex: 0 0 auto; }
.tf-dl-item .lbl { flex: 1 1 auto; }
.tf-dl-item .state { flex: 0 0 auto; color: #a1a1aa; font-size: 12px; }

/* ============ Note / leak cards ============ */
.tf-card {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 16px;
    background: #09090b;
    border: 1px solid #292929;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}
.tf-card .tf-card-icon { font-size: 22px; line-height: 1; }
.tf-card .tf-card-title { color: #fafafa; font-size: 16px; font-weight: 600; margin: 0; }
.tf-card .tf-card-sub { color: #a1a1aa; font-size: 13px; margin: 0; overflow-wrap: anywhere; }
.tf-card.tf-danger { border-color: rgba(207, 54, 45, 0.55); }
.tf-card.tf-danger .tf-card-icon { color: #e5564b; }
.tf-card-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tf-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 16px;
    background: rgb(207 54 45);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}
.tf-card-btn:hover { background: #b52b23; }
.tf-card-btn.secondary {
    background: transparent;
    color: #e5564b;
    border: 1px solid rgb(207 54 45);
}
.tf-card-btn.secondary:hover { background: rgba(207, 54, 45, 0.12); }
.tf-card-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.tf-warn {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    padding: 12px 16px;
    background: rgba(207, 54, 45, 0.08);
    color: #e5564b;
    border: 1px solid rgba(207, 54, 45, 0.5);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

/* ============ Spinner + toast (download status) ============ */
.tf-spin {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #e5564b;
    border-radius: 50%;
    animation: tf-spin 0.7s linear infinite;
    vertical-align: middle;
}
@keyframes tf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .tf-spin { animation-duration: 2s; } }

#tf-toast-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(360px, calc(100vw - 32px));
}
.tf-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #09090b;
    border: 1px solid #292929;
    border-left: 3px solid #71717a;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
    color: #fafafa;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    overflow-wrap: anywhere;
}
.tf-toast.show { opacity: 1; transform: translateY(0); }
.tf-toast.tf-loading { border-left-color: #e5564b; }
.tf-toast.tf-success { border-left-color: #22c55e; }
.tf-toast.tf-error { border-left-color: #ef4444; }
.tf-toast .tf-toast-ic { flex: 0 0 auto; font-size: 15px; width: 18px; text-align: center; }
.tf-toast.tf-success .tf-toast-ic { color: #22c55e; }
.tf-toast.tf-error .tf-toast-ic { color: #ef4444; }
.tf-toast .tf-toast-msg { flex: 1 1 auto; }
