/* =============================================================================
   ShareQR.css — "Weiter am Handy" toolbar button + QR popover (WikiShare.js).
   ============================================================================= */

/* Toolbar button (injected client-side) — blue tile near the top, matching the
   step button. Icon over label, full width of the vertical rail. */
.wiki-share-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3em;

    width: 100%;
    margin: 0 0 9px;
    padding: calc(0.55 * var(--behnke-basic)) calc(0.35 * var(--behnke-basic));

    font: inherit;
    font-weight: 600;
    font-size: calc(0.82 * var(--behnke-smaller-font-size, 0.85rem));
    line-height: 1.2;
    text-align: center;
    color: #fff;
    background: var(--behnke-design, #0066cc);
    border: none;
    border-radius: 11px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.30);
    transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.wiki-share-toggle:hover {
    background: var(--link-color, #00aaff);
    transform: translateY(-1px);
    box-shadow: 0 4px 13px rgba(0, 102, 204, 0.35);
}
.wiki-share-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--behnke-design, #0066cc);
}
.wiki-share-toggle__icon { display: inline-flex; align-items: center; }

@media (max-width: 700px) {
    .wiki-share-toggle__label { display: none; }
    .wiki-share-toggle { padding: calc(0.5 * var(--behnke-basic)); }
}
@media (prefers-reduced-motion: reduce) {
    .wiki-share-toggle:hover { transform: none; }
}

/* Popover overlay */
.wiki-share-overlay {
    position: fixed;
    inset: 0;
    z-index: 3500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--behnke-basic);
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.wiki-share-overlay.is-open { opacity: 1; }

.wiki-share-card {
    position: relative;
    box-sizing: border-box;
    width: min(360px, 92vw);
    padding: calc(1.6 * var(--behnke-basic)) calc(1.4 * var(--behnke-basic));
    text-align: center;
    background: var(--behnke-white, #fff);
    border-radius: calc(1 * var(--behnke-basic));
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    transform: translateY(8px) scale(0.98);
    transition: transform 0.2s ease;
}
.wiki-share-overlay.is-open .wiki-share-card { transform: none; }

.wiki-share-close {
    position: absolute;
    top: calc(0.6 * var(--behnke-basic));
    right: calc(0.6 * var(--behnke-basic));
    width: calc(1.8 * var(--behnke-basic));
    height: calc(1.8 * var(--behnke-basic));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--behnke-medium-gray, #9ca3af);
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}
.wiki-share-close:hover { background: var(--behnke-hover, rgba(0, 0, 0, 0.06)); color: var(--behnke-black, #1f2937); }

.wiki-share-title {
    margin: 0 0 var(--behnke-basic);
    font-weight: 600;
    font-size: var(--behnke-big-font-size, 1.15rem);
    color: var(--behnke-black, #1f2937);
}

.wiki-share-qr {
    width: 220px;
    max-width: 70%;
    margin: 0 auto var(--behnke-basic);
    padding: calc(0.6 * var(--behnke-basic));
    background: #fff;
    border: 1px solid var(--behnke-light-gray, #e5e7eb);
    border-radius: calc(0.6 * var(--behnke-basic));
}
.wiki-share-qr svg { display: block; width: 100%; height: auto; }

.wiki-share-hint {
    margin: 0 0 var(--behnke-basic);
    font-size: 0.85rem;
    color: var(--behnke-medium-black, #4b5563);
}

.wiki-share-url {
    margin: 0 0 var(--behnke-basic);
    font-size: 0.72rem;
    color: var(--behnke-medium-gray, #9ca3af);
    word-break: break-all;
}

.wiki-share-actions {
    display: flex;
    gap: calc(0.6 * var(--behnke-basic));
    justify-content: center;
}
.wiki-share-actions button {
    padding: calc(0.5 * var(--behnke-basic)) calc(1.2 * var(--behnke-basic));
    font-size: var(--behnke-normal-font-size);
    font-weight: 500;
    border-radius: 999px;
    cursor: pointer;
    border: 1.5px solid var(--behnke-light-gray, #e5e7eb);
    background: var(--behnke-white, #fff);
    color: var(--behnke-medium-black, #374151);
    transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}
.wiki-share-copy:hover { border-color: var(--behnke-design); color: var(--behnke-design); }
.wiki-share-copy.is-done { border-color: #16a34a; color: #16a34a; }
.wiki-share-native {
    color: #fff !important;
    background: var(--behnke-design) !important;
    border-color: var(--behnke-design) !important;
}

@media (prefers-reduced-motion: reduce) {
    .wiki-share-overlay, .wiki-share-card { transition: none; }
}

@media print {
    .wiki-share-toggle, .wiki-share-overlay { display: none !important; }
}
