.share-studio-toolbar .status {
    gap: 6px;
}

.share-studio-toolbar .status svg {
    width: 14px;
    height: 14px;
}

.share-studio-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
    align-items: start;
    gap: 18px;
    margin-bottom: 18px;
}

.share-url-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.input-with-counter {
    position: relative;
}

.input-with-counter .input,
.input-with-counter .textarea {
    padding-right: 64px;
}

.input-with-counter > span {
    position: absolute;
    top: 10px;
    right: 11px;
    color: var(--muted);
    font-size: 10px;
    pointer-events: none;
}

.share-mode-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.share-mode-options label {
    cursor: pointer;
}

.share-mode-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.share-mode-options label > span {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 56px;
    padding: 9px 11px;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: #fff;
}

.share-mode-options input:checked + span {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

.share-mode-options svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.share-mode-options strong,
.share-mode-options small {
    display: block;
}

.share-mode-options strong {
    font-size: 12px;
}

.share-mode-options small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 400;
}

.share-cover-upload {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 11px;
    border: 1px dashed var(--border-strong);
    border-radius: 8px;
    background: var(--surface-soft);
}

.share-cover-preview {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--muted);
    background: #e8eef1;
}

.share-cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.share-cover-upload-copy {
    display: grid;
    gap: 8px;
}

.share-cover-upload-copy small {
    color: var(--muted);
}

.share-cover-upload-copy .button[hidden] {
    display: none;
}

.share-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    align-items: center;
    margin-top: 18px;
    padding: 13px;
    border: 1px solid #a8d7c5;
    border-radius: 8px;
    background: var(--success-soft);
}

.share-result[hidden] {
    display: none;
}

.share-result > div {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--success);
}

.share-result > div svg {
    width: 17px;
    height: 17px;
}

.share-result a {
    grid-column: 1;
    min-width: 0;
    overflow: hidden;
    color: #286959;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-result .button {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.share-preview-stage {
    display: grid;
    place-items: center;
    min-height: 430px;
    padding: 18px;
    border-radius: 8px;
    background: #edf2f4;
}

.share-preview-phone {
    width: min(330px, 100%);
    overflow: hidden;
    border: 8px solid #263942;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(24, 45, 55, 0.18);
}

.share-preview-phone-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 15px;
    color: #dbe7eb;
    background: #263942;
    font-size: 10px;
}

.share-preview-phone-head strong {
    color: #fff;
    font-size: 11px;
}

.share-preview-chat {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-height: 350px;
    padding: 23px 14px;
    background: #edf0f2;
}

.share-preview-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 7px;
    color: #fff;
    background: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.wechat-share-card {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #d7dade;
    border-radius: 8px;
    background: #fff;
}

.share-preview-cover {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e5ebee;
}

.share-preview-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.share-preview-placeholder {
    display: grid;
    justify-items: center;
    gap: 5px;
    color: #8b9aa3;
    font-size: 10px;
}

.share-preview-placeholder svg {
    width: 24px;
    height: 24px;
}

.wechat-share-content {
    padding: 10px;
}

.wechat-share-content h3 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.wechat-share-content p {
    display: -webkit-box;
    margin: 5px 0 9px;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.wechat-share-content > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #94a1a8;
    font-size: 9px;
}

.wechat-share-content > div svg {
    width: 12px;
    height: 12px;
}

.share-preview-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 11px;
}

.share-preview-note svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    margin-top: 2px;
}

.share-preview-note p {
    margin: 0;
}

.share-library-panel {
    margin-top: 18px;
}

.share-library-panel .search-control {
    width: min(280px, 100%);
}

.share-link-card-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 230px;
}

.share-link-thumb {
    display: grid;
    place-items: center;
    width: 62px;
    height: 42px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 6px;
    color: var(--muted);
    background: #edf2f4;
}

.share-link-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.share-link-thumb svg {
    width: 18px;
    height: 18px;
}

.share-link-card-cell strong,
.share-link-card-cell span {
    display: block;
}

.share-link-card-cell strong {
    max-width: 260px;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
}

.share-link-card-cell span {
    color: var(--muted);
    font-size: 10px;
}

.share-link-url {
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-link-url a {
    display: block;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-link-url .button {
    width: 32px;
    padding: 0;
}

@media (max-width: 1050px) {
    .share-studio-grid {
        grid-template-columns: 1fr;
    }

    .share-preview-stage {
        min-height: 390px;
    }
}

@media (max-width: 640px) {
    .share-url-row,
    .share-mode-options,
    .share-cover-upload,
    .share-result {
        grid-template-columns: 1fr;
    }

    .share-result .button {
        grid-column: 1;
        grid-row: auto;
        width: 100%;
    }

    .share-preview-stage {
        min-height: 360px;
        padding: 10px;
    }

    .share-preview-phone {
        border-width: 6px;
        border-radius: 22px;
    }

    .share-library-panel .panel-header {
        align-items: stretch;
        flex-direction: column;
    }

    .share-library-panel .toolbar-group {
        width: 100%;
    }

    .share-library-panel .search-control {
        flex: 1;
    }
}
