/* Standalone dictionary card — safe inside WordPress Gutenberg iframes */

*, *::before, *::after { box-sizing: border-box; }

body.nk-embed-body {
    margin: 0;
    padding: 0.75rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #1a1a1a;
    background: #fff;
}

.nk-embed-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.15rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    max-width: 100%;
}

.nk-embed-card__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nk-embed-card__brand a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 600;
}

.nk-embed-card__lang a {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.nk-embed-card__question {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    line-height: 1.4;
}

.nk-embed-card__word {
    margin: 0 0 0.75rem;
}

.nk-embed-card__term {
    font-size: 1.65rem;
    font-weight: 700;
    font-family: Georgia, "Times New Roman", serif;
    color: #0f172a;
}

.nk-embed-card__phonetic {
    font-size: 1rem;
    color: #64748b;
    font-weight: 400;
}

.nk-embed-card__translations {
    margin: 0 0 0.75rem;
    padding: 0;
    list-style: none;
    border-top: 1px solid #edf2f7;
    border-bottom: 1px solid #edf2f7;
    padding: 0.65rem 0;
}

.nk-embed-card__translations li {
    margin: 0.25rem 0;
    color: #475569;
}

.nk-embed-card__code {
    display: inline-block;
    min-width: 2.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #1a73e8;
    margin-right: 0.35rem;
}

.nk-embed-card__meta {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: #64748b;
    font-style: italic;
}

.nk-embed-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.nk-embed-card__tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #edf2f7;
    color: #475569;
}

.nk-embed-card__tag--muted {
    background: #f1f5f9;
    color: #94a3b8;
}

.nk-embed-card__footer {
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.nk-embed-card__footer a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}

.nk-embed-card__footer a:hover {
    text-decoration: underline;
}

.nk-embed-card__embed-hint {
    margin-top: 1rem;
    font-size: 0.85rem;
}

.nk-embed-card__embed-hint summary {
    cursor: pointer;
    color: #1a73e8;
    font-weight: 600;
}

.nk-embed-card__snippet {
    width: 100%;
    margin-top: 0.5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.nk-embed-card__hint {
    margin: 0.5rem 0 0;
    color: #64748b;
    font-size: 0.8rem;
}

.nk-embed-card--compact .nk-embed-card__question {
    font-size: 0.88rem;
}

.nk-embed-card--compact .nk-embed-card__term {
    font-size: 1.45rem;
}

/* Embed button on dictionary cards (main site) */
.word-item-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.25rem;
    z-index: 2;
}

.word-embed-btn {
    position: static;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    opacity: 0.85;
    transition: opacity 0.15s, background 0.15s;
    padding: 0;
    color: #1a73e8;
}

.word-embed-btn:hover {
    opacity: 1;
    background: #eff6ff;
}

/* Social share buttons */
.nk-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1rem;
}

.nk-share__label {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.nk-share__buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.nk-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.nk-share__btn svg {
    width: 1.15rem;
    height: 1.15rem;
}

.nk-share__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}

.nk-share__btn--whatsapp {
    background: #25d366;
    color: #fff;
}

.nk-share__btn--x {
    background: #0f172a;
    color: #fff;
}

.nk-share__btn--facebook {
    background: #1877f2;
    color: #fff;
}

.nk-share__btn--linkedin {
    background: #0a66c2;
    color: #fff;
}

.nk-share__btn--telegram {
    background: #26a5e4;
    color: #fff;
}

.nk-share__btn--copy {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.nk-share--compact .nk-share__btn {
    width: 2rem;
    height: 2rem;
}

.nk-share--compact .nk-share__btn svg {
    width: 1rem;
    height: 1rem;
}

.nk-share--bar {
    margin: 1.25rem 0 1.5rem;
    padding: 1rem 1.1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.word-headings {
    margin: 0 0 0.75rem;
    line-height: 1.45;
    font-weight: 600;
}

.word-headings__en,
.word-headings__sw {
    display: block;
}

.word-headings__sw {
    margin-top: 0.35rem;
    font-size: 0.92em;
    font-weight: 500;
    color: #475569;
}

.word-headings__link {
    color: inherit;
    text-decoration: none;
}

.word-headings__link:hover .word-headings__en,
.word-headings__link:hover .word-headings__sw {
    color: #1a73e8;
}

.word-page-view {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.word-page-breadcrumb {
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
    color: #64748b;
}

.word-page-breadcrumb a {
    color: #1a73e8;
    text-decoration: none;
}

.word-embed-panel {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.word-embed-panel h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.word-embed-panel__lead {
    margin: 0 0 0.75rem;
    color: #555;
    font-size: 0.9rem;
}

.word-embed-panel__textarea {
    width: 100%;
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    resize: vertical;
}

.word-embed-panel__btn {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    background: #1a73e8;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.nk-embed-card__translations a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}

.nk-embed-card__translations a:hover {
    text-decoration: underline;
}

.word-item-translation a {
    color: var(--primary-color, #1a73e8);
    text-decoration: none;
    font-weight: 500;
}

.word-item-translation a:hover {
    text-decoration: underline;
}

.word-embed-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #fff;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

/* Embed help page */
.embed-help-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

.embed-help-breadcrumb {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.embed-help-breadcrumb a {
    color: #1a73e8;
    text-decoration: none;
}

.embed-help-hero {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #1a73e8;
}

.embed-help-hero h1 {
    font-family: var(--font-serif, Georgia, serif);
    font-size: 2.2rem;
    margin: 0 0 1rem;
    color: var(--text-primary, #0f172a);
}

.embed-help-hero__en,
.embed-help-hero__sw {
    margin: 0.35rem 0;
    color: var(--text-secondary, #475569);
    line-height: 1.6;
}

.embed-help-hero__sw {
    font-style: italic;
}

.embed-help-section,
.embed-help-example {
    margin-bottom: 2.5rem;
}

.embed-help-section h2,
.embed-help-example h2 {
    font-family: var(--font-serif, Georgia, serif);
    font-size: 1.55rem;
    margin: 0 0 1rem;
    color: var(--text-primary, #0f172a);
}

.embed-help-example h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin: 1.5rem 0 0.75rem;
}

.embed-help-example__lead {
    color: var(--text-secondary, #475569);
    margin: 0 0 1rem;
}

.embed-help-steps {
    padding-left: 1.25rem;
    line-height: 1.7;
    color: var(--text-secondary, #475569);
}

.embed-help-steps li + li {
    margin-top: 0.5rem;
}

.embed-help-preview {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
}

.embed-help-code {
    width: 100%;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.5;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    color: #0f172a;
    resize: vertical;
}

.embed-help-code--block {
    white-space: pre-wrap;
    word-break: break-all;
    overflow-x: auto;
}

.embed-help-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.embed-help-copy-btn,
.embed-help-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
}

.embed-help-copy-btn {
    background: #1a73e8;
    color: #fff;
}

.embed-help-copy-btn:hover {
    background: #1557b0;
}

.embed-help-link-btn {
    background: #fff;
    color: #1a73e8;
    border: 1px solid #cbd5e1;
}

.embed-help-link-btn:hover {
    background: #eff6ff;
}

.word-embed-panel__lead a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}

.word-embed-panel__lead a:hover {
    text-decoration: underline;
}
