/*!
 * Desktop-only Bookmark Nudge Toast/Modal
 * Shared across all EasyToolio tools.
 */

/* Hidden state */
.sf-bm[hidden],
#sf-bm[hidden] {
    display: none !important;
}

/* Base card positioning and appearance */
.sf-bm,
#sf-bm {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 9999;
    width: 21rem;
    max-width: calc(100vw - 2rem);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    box-sizing: border-box;
    font-family: inherit;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
    color: #18181b;
    border: 1px solid rgba(228, 228, 231, 0.9);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: sf-bm-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Dark mode card */
.dark .sf-bm,
.dark #sf-bm,
html.dark .sf-bm,
html.dark #sf-bm {
    background: rgba(24, 24, 27, 0.96);
    color: #fafafa;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Icon badge */
.sf-bm__ico {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.65rem;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--tool-accent, #10b981), #059669);
    color: #ffffff;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px -2px rgba(16, 185, 129, 0.35);
}

/* Text container */
.sf-bm__txt {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.45;
}

.sf-bm__txt strong {
    font-size: 0.825rem;
    font-weight: 700;
    line-height: 1.3;
    color: #18181b;
}

.dark .sf-bm__txt strong,
html.dark .sf-bm__txt strong {
    color: #fafafa;
}

.sf-bm__txt span {
    font-size: 0.74rem;
    line-height: 1.45;
    color: #71717a;
}

.dark .sf-bm__txt span,
html.dark .sf-bm__txt span {
    color: #a1a1aa;
}

/* Keyboard shortcut badge */
.sf-bm kbd,
#sf-bm kbd {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.1;
    border-radius: 0.3rem;
    border: 1px solid #d4d4d8;
    border-bottom-width: 2px;
    background: #f4f4f5;
    color: #18181b;
}

.dark .sf-bm kbd,
.dark #sf-bm kbd,
html.dark .sf-bm kbd,
html.dark #sf-bm kbd {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fafafa;
}

/* Don't show again link */
.sf-bm__link {
    align-self: flex-start;
    margin-top: 0.25rem;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 0.68rem;
    color: #a1a1aa;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 0.15s ease;
}

.sf-bm__link:hover {
    color: var(--tool-accent, #10b981);
}

/* Close dismiss button */
.sf-bm__x {
    flex: 0 0 auto;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    background: transparent;
    border-radius: 0.375rem;
    display: grid;
    place-items: center;
    color: #a1a1aa;
    cursor: pointer;
    padding: 0;
    margin-left: 0.25rem;
    margin-top: -0.15rem;
    transition: all 0.15s ease;
}

.sf-bm__x:hover {
    color: #18181b;
    background: rgba(0, 0, 0, 0.06);
}

.dark .sf-bm__x:hover,
html.dark .sf-bm__x:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Slide up entrance animation */
@keyframes sf-bm-slide-up {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Desktop-only: hide on tablet and mobile */
@media (max-width: 1023px) {
    .sf-bm,
    #sf-bm {
        display: none !important;
    }
}

/* Hide when printing */
@media print {
    .sf-bm,
    #sf-bm {
        display: none !important;
    }
}
