/**
 * plugins/generic/articleShareTools/styles.css
 * Copyright (c) 2026 Jurnal Wasian / Forces. GNU GPL v3.
 */

/* Wrapper that puts the "Abstract" heading and the share bar on one row. */
.ast-abstract-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ast-abstract-row > h2,
.ast-abstract-row > h3,
.ast-abstract-row > .label {
    margin: 0 !important;
    line-height: 1.2;
}

.ast-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    margin: 0;
}

.ast-bar__heading {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
    margin-right: 4px;
}

/* Flat icon buttons: the glyph keeps its brand colour, but there is no solid
   coloured circle behind it. */
.ast-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    color: #64748b;
    background: transparent;
    line-height: 0;
    transition: background 0.15s ease, transform 0.15s ease;
}

.ast-btn:hover,
.ast-btn:focus {
    background: rgba(100, 116, 139, 0.14);
    transform: translateY(-1px);
    outline: none;
}

.ast-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Brand-coloured glyphs (transparent background). */
.ast-btn--whatsapp { color: #25d366; }
.ast-btn--facebook { color: #1877f2; }
.ast-btn--instagram { color: #e1306c; }
.ast-btn--print { color: #4b5563; }
.ast-btn--qr { color: #334155; }

/* Second bar at the end of the article body. */
.ast-share-bottom {
    margin: 30px 0 10px;
    padding-top: 16px;
    border-top: 1px solid #e3e8ef;
}

.ast-share-bottom .ast-bar {
    justify-content: flex-start;
    gap: 4px;
}

.ast-share-bottom .ast-bar__heading {
    font-size: 0.82rem;
    color: #5c6b7a;
}

/* Visually hidden labels (kept for screen readers / tooltips via title). */
.ast-btn__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Toast (Instagram copy confirmation). */
.ast-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(20px);
    background: #111827;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    max-width: 90vw;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100000;
}

.ast-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* QR modal. */
.ast-qr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100001;
    padding: 16px;
}

.ast-qr-box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 26px 26px 22px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    max-width: 300px;
}

.ast-qr-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 14px;
}

.ast-qr-canvas {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.ast-qr-canvas canvas,
.ast-qr-canvas > img {
    display: block;
}

/* Journal logo knocked into the centre of the QR, on a white chip that keeps
   the code scannable. */
.ast-qr-canvas .ast-qr-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24%;
    height: 24%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    background: #fff;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 0 0 3px #fff;
}

.ast-qr-close {
    position: absolute;
    top: 6px;
    right: 10px;
    border: 0;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
}

.ast-qr-close:hover { color: #111827; }

@media print {
    .ast-bar { display: none !important; }
}
