:root {
--swsocial-accent: #0ea5e9;
--swsocial-text: #0f172a;
--swsocial-muted: #64748b;
--swsocial-border: rgba(15, 23, 42, 0.14);
--swsocial-soft: #f8fafc;
--swsocial-white: #ffffff;
--swsocial-danger: #991b1b;
}
.swsocial-share,
.swsocial-share * {
box-sizing: border-box;
}
.swsocial-share {
width: 100%;
max-width: 100%;
margin: clamp(20px, 4vw, 34px) 0;
color: var(--swsocial-text);
font-family: inherit;
overflow-wrap: anywhere;
}
.swsocial-card {
display: grid;
grid-template-columns: minmax(104px, 180px) minmax(0, 1fr);
gap: clamp(14px, 2.4vw, 22px);
align-items: center;
margin-bottom: 16px;
padding: clamp(14px, 2vw, 20px);
overflow: hidden;
border: 1px solid var(--swsocial-border);
border-radius: 22px;
background: linear-gradient(135deg, #ffffff, #f8fafc);
box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}
.swsocial-card-image {
aspect-ratio: 16 / 10;
overflow: hidden;
border-radius: 16px;
background: var(--swsocial-soft);
}
.swsocial-card-image img {
display: block;
width: 100%;
height: 100%;
max-width: none;
object-fit: cover;
}
.swsocial-card-body {
min-width: 0;
}
.swsocial-card-body:only-child {
grid-column: 1 / -1;
}
.swsocial-card-kicker {
display: inline-flex;
margin-bottom: 5px;
color: var(--swsocial-accent);
font-size: 0.76rem;
font-weight: 800;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.swsocial-card strong {
display: block;
margin: 0;
color: var(--swsocial-text);
font-size: clamp(1rem, 2vw, 1.25rem);
line-height: 1.3;
}
.swsocial-card p {
display: -webkit-box;
margin: 8px 0 0;
overflow: hidden;
color: var(--swsocial-muted);
font-size: 0.95rem;
line-height: 1.55;
-webkit-box-orient: vertical;
-webkit-line-clamp: 4;
}
.swsocial-heading {
margin: 0 0 10px;
color: var(--swsocial-text);
font-size: 0.95rem;
font-weight: 800;
letter-spacing: 0.01em;
}
.swsocial-buttons {
display: flex;
max-width: 100%;
flex-wrap: wrap;
gap: 10px;
align-items: center;
}
.swsocial-button {
--swsocial-button-bg: #0f172a;
--swsocial-button-color: #ffffff;
display: inline-flex;
min-width: 0;
min-height: 42px;
max-width: 100%;
align-items: center;
justify-content: center;
gap: 8px;
padding: 0.68rem 1rem;
border: 1px solid transparent;
border-radius: 999px;
background: var(--swsocial-button-bg);
box-shadow: 0 10px 22px rgba(15, 23, 42, 0.13);
color: var(--swsocial-button-color) !important;
cursor: pointer;
font-size: 0.92rem;
font-weight: 750;
line-height: 1;
text-decoration: none !important;
touch-action: manipulation;
transform: translateY(0);
transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
white-space: nowrap;
-webkit-tap-highlight-color: transparent;
}
.swsocial-button:hover {
color: var(--swsocial-button-color) !important;
opacity: 0.94;
transform: translateY(-2px);
box-shadow: 0 15px 28px rgba(15, 23, 42, 0.18);
}
.swsocial-button:focus-visible {
outline: 3px solid var(--swsocial-accent);
outline-offset: 3px;
color: var(--swsocial-button-color) !important;
}
.swsocial-icon {
display: inline-flex;
width: 18px;
height: 18px;
flex: 0 0 auto;
}
.swsocial-icon svg {
display: block;
width: 18px;
height: 18px;
fill: currentColor;
}
.swsocial-label-text {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
.swsocial-icon-only {
width: 44px;
min-width: 44px;
padding-right: 0;
padding-left: 0;
}
.swsocial-style-rounded .swsocial-button {
border-radius: 12px;
}
.swsocial-style-square .swsocial-button {
border-radius: 4px;
}
.swsocial-style-circle .swsocial-button {
width: 46px;
min-width: 46px;
padding-right: 0;
padding-left: 0;
border-radius: 999px;
}
.swsocial-style-circle .swsocial-label-text {
display: none;
}
.swsocial-size-small .swsocial-button {
min-height: 36px;
padding: 0.54rem 0.8rem;
font-size: 0.82rem;
}
.swsocial-size-large .swsocial-button {
min-height: 50px;
padding: 0.85rem 1.15rem;
font-size: 1rem;
}
.swsocial-theme-brand .swsocial-facebook { --swsocial-button-bg: #1877f2; }
.swsocial-theme-brand .swsocial-x { --swsocial-button-bg: #111827; }
.swsocial-theme-brand .swsocial-threads { --swsocial-button-bg: #000000; }
.swsocial-theme-brand .swsocial-linkedin { --swsocial-button-bg: #0a66c2; }
.swsocial-theme-brand .swsocial-pinterest { --swsocial-button-bg: #bd081c; }
.swsocial-theme-brand .swsocial-reddit { --swsocial-button-bg: #d93a00; }
.swsocial-theme-brand .swsocial-bluesky { --swsocial-button-bg: #0b78e3; }
.swsocial-theme-brand .swsocial-whatsapp { --swsocial-button-bg: #1da851; }
.swsocial-theme-brand .swsocial-email { --swsocial-button-bg: #475569; }
.swsocial-theme-brand .swsocial-native { --swsocial-button-bg: var(--swsocial-accent); }
.swsocial-theme-brand .swsocial-copytext { --swsocial-button-bg: var(--swsocial-accent); }
.swsocial-theme-brand .swsocial-copy { --swsocial-button-bg: #334155; }
.swsocial-theme-dark .swsocial-button {
--swsocial-button-bg: #0f172a;
--swsocial-button-color: #ffffff;
}
.swsocial-theme-accent .swsocial-button {
--swsocial-button-bg: var(--swsocial-accent);
--swsocial-button-color: #ffffff;
}
.swsocial-theme-light .swsocial-button {
--swsocial-button-bg: #ffffff;
--swsocial-button-color: #0f172a;
border-color: var(--swsocial-border);
box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
.swsocial-copied {
opacity: 0.94;
}
.swsocial-status {
max-height: 0;
margin-top: 0;
overflow: hidden;
color: var(--swsocial-text);
font-size: 0.88rem;
font-weight: 700;
line-height: 1.45;
opacity: 0;
transition: max-height 180ms ease, margin-top 180ms ease, opacity 180ms ease;
}
.swsocial-status-visible {
max-height: 160px;
margin-top: 10px;
padding: 10px 12px;
border: 1px solid rgba(14, 165, 233, 0.3);
border-radius: 10px;
background: rgba(14, 165, 233, 0.08);
opacity: 1;
}
.swsocial-status-error {
border-color: rgba(153, 27, 27, 0.35);
background: rgba(153, 27, 27, 0.08);
color: var(--swsocial-danger);
}
.swsocial-floating {
position: fixed;
z-index: 99990;
top: 50%;
left: 16px;
width: auto;
max-width: 58px;
margin: 0;
transform: translateY(-50%);
}
.swsocial-floating .swsocial-buttons {
flex-direction: column;
gap: 8px;
}
.swsocial-floating .swsocial-button {
width: 46px;
min-width: 46px;
min-height: 46px;
padding: 0;
border-radius: 999px;
}
.swsocial-floating .swsocial-label-text,
.swsocial-floating .swsocial-heading,
.swsocial-floating .swsocial-card {
display: none;
}
html.swsocial-dialog-open,
body.swsocial-dialog-open {
overflow: hidden !important;
overscroll-behavior: contain;
}
.swsocial-dialog {
position: fixed;
z-index: 999999;
inset: 0;
display: grid;
place-items: center;
overflow-y: auto;
padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
background: rgba(15, 23, 42, 0.64);
overscroll-behavior: contain;
-webkit-overflow-scrolling: touch;
}
.swsocial-dialog-panel {
position: relative;
width: min(640px, 100%);
max-height: min(92vh, 760px);
max-height: min(92dvh, 760px);
overflow-y: auto;
padding: 24px;
border: 1px solid rgba(255, 255, 255, 0.65);
border-radius: 20px;
background: #ffffff;
box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
color: #0f172a;
overscroll-behavior: contain;
-webkit-overflow-scrolling: touch;
}
.swsocial-dialog-panel strong {
display: block;
margin: 0 44px 8px 0;
font-size: 1.15rem;
line-height: 1.35;
}
.swsocial-dialog-panel p {
margin: 0 0 14px;
color: #475569;
line-height: 1.55;
}
.swsocial-dialog-panel textarea {
width: 100%;
min-height: 150px;
max-height: 34vh;
max-height: 34dvh;
padding: 12px;
border: 1px solid rgba(15, 23, 42, 0.2);
border-radius: 12px;
background: #ffffff;
color: #0f172a;
font: inherit;
font-size: 16px;
line-height: 1.5;
resize: vertical;
}
.swsocial-dialog-close {
position: absolute;
top: 12px;
right: 12px;
display: inline-flex;
width: 38px;
height: 38px;
align-items: center;
justify-content: center;
border: 0;
border-radius: 999px;
background: rgba(15, 23, 42, 0.08);
color: #0f172a;
cursor: pointer;
font-size: 25px;
line-height: 1;
touch-action: manipulation;
}
.swsocial-dialog-close:hover {
background: rgba(15, 23, 42, 0.14);
}
.swsocial-guided-dialog .swsocial-guide-panel {
display: flex;
width: min(720px, 100%);
flex-direction: column;
}
.swsocial-guide-note {
max-width: 64ch;
}
.swsocial-guide-preview {
display: grid;
grid-template-columns: 128px minmax(0, 1fr);
gap: 14px;
align-items: center;
margin: 14px 0;
padding: 12px;
border: 1px solid rgba(15, 23, 42, 0.13);
border-radius: 14px;
background: #f8fafc;
}
.swsocial-guide-image {
aspect-ratio: 16 / 10;
overflow: hidden;
border-radius: 10px;
background: #e2e8f0;
}
.swsocial-guide-image img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
.swsocial-guide-copy {
display: grid;
min-width: 0;
gap: 5px;
}
.swsocial-guide-copy span {
overflow: hidden;
color: #0f172a;
font-weight: 750;
line-height: 1.35;
text-overflow: ellipsis;
}
.swsocial-guide-copy small {
display: -webkit-box;
overflow: hidden;
color: #64748b;
line-height: 1.45;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
}
.swsocial-guide-label {
display: block;
margin: 4px 0 7px;
color: #334155;
font-size: 0.78rem;
font-weight: 750;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.swsocial-guide-actions {
position: sticky;
z-index: 2;
bottom: -24px;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
margin: 16px -24px -24px;
padding: 14px 24px 24px;
border-top: 1px solid rgba(15, 23, 42, 0.09);
background: #ffffff;
}
.swsocial-guide-copy-button,
.swsocial-guide-open-button {
min-height: 46px;
padding: 0 16px;
border: 1px solid transparent;
border-radius: 11px;
cursor: pointer;
font: inherit;
font-weight: 750;
touch-action: manipulation;
}
.swsocial-guide-copy-button {
border-color: #cbd5e1;
background: #ffffff;
color: #0f172a;
}
.swsocial-guide-open-button {
background: #1877f2;
color: #ffffff;
}
.swsocial-dialog-close:focus-visible,
.swsocial-guide-copy-button:focus-visible,
.swsocial-guide-open-button:focus-visible,
.swsocial-dialog-panel textarea:focus-visible {
outline: 3px solid var(--swsocial-accent);
outline-offset: 3px;
}
@media (max-width: 780px) {
.swsocial-share {
margin: 22px 0;
}
.swsocial-card {
grid-template-columns: 1fr;
border-radius: 18px;
}
.swsocial-card-image {
aspect-ratio: 16 / 9;
}
.swsocial-share:not(.swsocial-floating) .swsocial-buttons {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 9px;
}
.swsocial-share:not(.swsocial-floating) .swsocial-button {
width: 100%;
min-width: 0;
}
.swsocial-share:not(.swsocial-floating).swsocial-style-circle .swsocial-button,
.swsocial-share:not(.swsocial-floating) .swsocial-icon-only {
width: 100%;
}
.swsocial-floating {
top: auto;
right: 0;
bottom: 0;
left: 0;
width: 100%;
max-width: none;
padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
border-top: 1px solid var(--swsocial-border);
background: rgba(255, 255, 255, 0.96);
transform: none;
backdrop-filter: blur(14px);
}
.swsocial-floating .swsocial-buttons {
flex-direction: row;
flex-wrap: nowrap;
justify-content: safe center;
overflow-x: auto;
scrollbar-width: none;
}
.swsocial-floating .swsocial-buttons::-webkit-scrollbar {
display: none;
}
.swsocial-floating .swsocial-button {
width: 44px;
min-width: 44px;
min-height: 44px;
flex: 0 0 44px;
}
.swsocial-dialog {
place-items: end center;
padding: 10px 10px max(10px, env(safe-area-inset-bottom));
}
.swsocial-dialog-panel {
width: 100%;
max-height: calc(100vh - 20px);
max-height: calc(100dvh - 20px);
padding: 20px 16px 16px;
border-radius: 18px 18px 12px 12px;
}
.swsocial-dialog-panel textarea {
min-height: 132px;
max-height: 28vh;
max-height: 28dvh;
}
.swsocial-guide-preview {
grid-template-columns: 82px minmax(0, 1fr);
gap: 10px;
padding: 10px;
}
.swsocial-guide-actions {
bottom: -16px;
margin: 14px -16px -16px;
padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
}
}
@media (max-width: 520px) {
.swsocial-share:not(.swsocial-floating) .swsocial-buttons {
display: flex;
flex-wrap: nowrap;
overflow-x: auto;
padding: 3px 3px 8px;
scroll-snap-type: x proximity;
scrollbar-width: thin;
}
.swsocial-share:not(.swsocial-floating) .swsocial-button {
width: auto;
min-width: max-content;
flex: 0 0 auto;
scroll-snap-align: start;
}
.swsocial-share:not(.swsocial-floating).swsocial-style-circle .swsocial-button,
.swsocial-share:not(.swsocial-floating) .swsocial-icon-only {
width: 44px;
min-width: 44px;
}
.swsocial-guide-actions {
grid-template-columns: 1fr;
}
}
@media (max-width: 360px) {
.swsocial-guide-preview {
grid-template-columns: 1fr;
}
.swsocial-guide-image {
max-height: 130px;
}
}
@media (max-height: 620px) and (max-width: 900px) {
.swsocial-dialog-panel textarea {
min-height: 84px;
max-height: 22vh;
max-height: 22dvh;
}
.swsocial-guide-preview {
margin: 8px 0;
}
}
@media (prefers-reduced-motion: reduce) {
.swsocial-button,
.swsocial-status,
.swsocial-dialog,
.swsocial-dialog-panel {
animation: none !important;
scroll-behavior: auto;
transition: none !important;
}
.swsocial-button:hover {
transform: none;
}
}
@media (forced-colors: active) {
.swsocial-button,
.swsocial-card,
.swsocial-dialog-panel,
.swsocial-guide-preview,
.swsocial-status-visible {
border: 1px solid CanvasText;
}
.swsocial-button:focus-visible,
.swsocial-dialog-close:focus-visible,
.swsocial-guide-copy-button:focus-visible,
.swsocial-guide-open-button:focus-visible {
outline: 3px solid Highlight;
}
}
@media print {
.swsocial-share,
.swsocial-dialog {
display: none !important;
}
}