/* =========================================================
   Share Work Modal
   ========================================================= */

.share-modal {
    position: relative;

    display: flex;
    flex-direction: column;

    width: min(590px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);

    box-sizing: border-box;
    padding: 26px 28px 24px;

    overflow: hidden;

    border: 1px solid rgba(220, 228, 240, .95);
    border-radius: 17px;

    background: #ffffff;

    box-shadow:
        0 32px 90px rgba(15, 30, 60, .24);
}

.share-modal .modal-close {
    position: absolute;
    top: 14px;
    right: 15px;

    width: 36px;
    height: 36px;

    z-index: 5;
}

.share-head {
    flex: 0 0 auto;

    padding-right: 38px;
}

.share-eyebrow {
    color: #2b63d6;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .18em;
}

.share-head h2 {
    margin: 9px 0 7px;

    color: #13243c;

    font-size: 23px;
    line-height: 1.35;
    letter-spacing: -.035em;
}

.share-description {
    margin: 0;

    color: #6d7c91;

    font-size: 12.5px;
    line-height: 1.7;
}

.share-loading {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    gap: 10px;

    margin-top: 22px;
    padding: 14px 15px;

    border: 1px solid #e1e8f2;
    border-radius: 10px;

    background: #f7f9fd;

    color: #5e6e84;

    font-size: 12px;
}

.share-spinner {
    width: 14px;
    height: 14px;

    border: 2px solid #d5e0ef;
    border-top-color: #2b63d6;
    border-radius: 50%;

    animation: share-spin .7s linear infinite;
}

@keyframes share-spin {
    to {
        transform: rotate(360deg);
    }
}

.share-content {
    flex: 1 1 auto;
    min-height: 0;

    margin-top: 20px;
    padding-right: 2px;

    overflow-y: auto;
    overscroll-behavior: contain;
}

.share-label {
    display: block;

    margin-bottom: 7px;

    color: #65768d;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.share-link-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.share-link-input {
    flex: 1;
    min-width: 0;
    height: 40px;

    box-sizing: border-box;
    padding: 0 11px;

    border: 1px solid #d8e2ef;
    border-radius: 8px;

    background: #f7f9fd;
    color: #263e5e;

    font: 11.5px/1.4 "SFMono-Regular", Consolas, monospace;

    outline: none;
}

.share-link-input:focus {
    border-color: #8caeff;
    box-shadow: 0 0 0 3px rgba(43, 99, 214, .1);
}

.share-copy-btn {
    flex: 0 0 auto;
    height: 40px;
    padding: 0 16px;

    border: 1px solid #2b63d6;
    border-radius: 8px;

    background: #2b63d6;
    color: #fff;

    font: inherit;
    font-size: 12px;
    font-weight: 750;

    cursor: pointer;

    transition:
        background .16s ease,
        border-color .16s ease;
}

.share-copy-btn:hover {
    background: #2455bd;
    border-color: #2455bd;
}

.share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 10px;
}

.share-secondary-btn {
    height: 32px;
    padding: 0 11px;

    border: 1px solid #dce5f0;
    border-radius: 7px;

    background: #fff;
    color: #5c6e85;

    font: inherit;
    font-size: 11px;
    font-weight: 650;

    cursor: pointer;
}

.share-secondary-btn:hover {
    border-color: #bdcbe0;
    background: #f7f9fd;
    color: #243e60;
}

.share-wechat {
    margin-top: 18px;
    padding: 14px 15px;

    border: 1px solid #dfe8f3;
    border-radius: 10px;

    background:
        linear-gradient(145deg, #f7fbf8, #f1f8f3);
}

.share-wechat-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    margin-bottom: 7px;

    color: #2a6b4b;

    font-size: 12px;
    font-weight: 800;
}

.share-wechat-badge {
    padding: 2px 6px;

    border: 1px solid #c9e5d3;
    border-radius: 999px;

    color: #3d8c61;

    font-size: 8px;
    font-weight: 800;
    letter-spacing: .1em;
}

.share-wechat p {
    margin: 0;

    color: #657d6d;

    font-size: 11.5px;
    line-height: 1.7;
}

.share-wechat-note {
    margin-top: 7px !important;
    color: #84988a !important;
    font-size: 10.5px !important;
}

.share-wechat code,
.share-local-warning code {
    padding: 1px 4px;

    border-radius: 4px;

    background: rgba(31, 60, 41, .06);
    color: #365e47;

    font-size: .92em;
}

.share-local-warning {
    margin-top: 10px;
    padding: 10px 12px;

    border: 1px solid #f0dfbd;
    border-radius: 8px;

    background: #fffaf0;
    color: #8d6a2f;

    font-size: 10.5px;
    line-height: 1.6;
}

.share-meta {
    margin-top: 12px;

    color: #9aa7b7;

    font-size: 9.5px;
    line-height: 1.5;
}

.share-error {
    flex: 0 0 auto;

    margin-top: 16px;
    padding: 11px 12px;

    border: 1px solid #f0d5d5;
    border-radius: 8px;

    background: #fff7f7;
    color: #b34b4b;

    font-size: 12px;
    line-height: 1.6;
}

html[data-theme="dark"] .share-modal {
    border-color: #343c49;
    background: #1f232b;
    color: #e4e7ee;
}

html[data-theme="dark"] .share-head h2 {
    color: #f0f3f9;
}

html[data-theme="dark"] .share-description,
html[data-theme="dark"] .share-label,
html[data-theme="dark"] .share-meta {
    color: #98a2b3;
}

html[data-theme="dark"] .share-link-input {
    border-color: #3a4352;
    background: #242a34;
    color: #e4e7ee;
}

html[data-theme="dark"] .share-secondary-btn {
    border-color: #3a4352;
    background: #242a34;
    color: #c7d0dd;
}

html[data-theme="dark"] .share-wechat {
    border-color: #35483d;
    background: linear-gradient(145deg, #1f2b25, #202923);
}

@media (max-width: 520px) {

    .share-modal {
        width: calc(100vw - 22px);

        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);

        padding: 22px 18px 18px;
    }

    .share-modal .modal-close {
        top: 12px;
        right: 12px;

        width: 38px;
        height: 38px;

        font-size: 23px;

        touch-action: manipulation;
    }

    .share-head {
        padding-right: 36px;
    }

    .share-link-row {
        flex-direction: column;
    }

    .share-copy-btn {
        width: 100%;
    }
}
