/* =========================================================
   ShareWise Social Buttons — Frontend CSS
   ========================================================= */

:root {
    --sw-gap: 8px;
    --sw-radius: 6px;
    --sw-radius-pill: 999px;
    --sw-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --sw-transition: 0.18s ease;
}

/* ── Wrapper ── */
.sharewise-wrap {
    margin: 24px 0;
    font-family: var(--sw-font);
}
.sharewise-wrap.sharewise-align-center { text-align: center; }
.sharewise-wrap.sharewise-align-right  { text-align: right; }
.sharewise-wrap.sharewise-align-left   { text-align: left; }

.sharewise-heading {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
}

/* ── Button row ── */
.sharewise-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    gap: var(--sw-gap);
    align-items: center;
}
.sharewise-align-center .sharewise-buttons { justify-content: center; }
.sharewise-align-right  .sharewise-buttons { justify-content: flex-end; }

/* ── Base button ── */
.sharewise-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    font-family: var(--sw-font);
    font-weight: 600;
    white-space: nowrap;
    transition: transform var(--sw-transition), box-shadow var(--sw-transition), opacity var(--sw-transition);
    line-height: 1;
}

.sharewise-btn svg {
    flex-shrink: 0;
    display: block;
}

.sharewise-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    opacity: 0.93;
    text-decoration: none !important;
}
.sharewise-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ── Sizes ── */
.sharewise-size-small  .sharewise-btn { padding: 6px 12px; font-size: 12px; border-radius: var(--sw-radius); }
.sharewise-size-small  .sharewise-btn svg { width: 14px; height: 14px; }

.sharewise-size-medium .sharewise-btn { padding: 9px 16px; font-size: 13px; border-radius: var(--sw-radius); }
.sharewise-size-medium .sharewise-btn svg { width: 17px; height: 17px; }

.sharewise-size-large  .sharewise-btn { padding: 12px 22px; font-size: 15px; border-radius: var(--sw-radius); }
.sharewise-size-large  .sharewise-btn svg { width: 20px; height: 20px; }

/* ── Style: Filled (default) ── */
.sharewise-style-filled .sharewise-btn {
    background-color: var(--sw-btn-color);
    color: #fff !important;
}

/* ── Style: Outline ── */
.sharewise-style-outline .sharewise-btn {
    background-color: transparent;
    color: var(--sw-btn-color) !important;
    border: 2px solid var(--sw-btn-color);
}
.sharewise-style-outline .sharewise-btn:hover {
    background-color: var(--sw-btn-color);
    color: #fff !important;
}

/* ── Style: Icon Only ── */
.sharewise-style-icon-only .sharewise-btn {
    background-color: var(--sw-btn-color);
    color: #fff !important;
    padding: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    justify-content: center;
}
.sharewise-size-small .sharewise-style-icon-only .sharewise-btn,
.sharewise-style-icon-only.sharewise-size-small .sharewise-btn { width: 30px; height: 30px; }
.sharewise-size-large .sharewise-style-icon-only .sharewise-btn,
.sharewise-style-icon-only.sharewise-size-large .sharewise-btn { width: 46px; height: 46px; }
.sharewise-style-icon-only .sharewise-label { display: none; }

/* ── Style: Pill ── */
.sharewise-style-pill .sharewise-btn {
    background-color: var(--sw-btn-color);
    color: #fff !important;
    border-radius: var(--sw-radius-pill);
}

/* ── Floating Sidebar ── */
.sharewise-floating {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.sharewise-float-left  { left: 0; }
.sharewise-float-right { right: 0; }

.sharewise-floating .sharewise-wrap {
    margin: 0;
}

.sharewise-floating .sharewise-buttons {
    flex-direction: column;
    gap: 3px;
}

/* Floating: icon-circle style */
.sharewise-floating .sharewise-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 0;
    justify-content: center;
    background-color: var(--sw-btn-color);
    color: #fff !important;
    opacity: 0.88;
    transition: width 0.22s ease, opacity 0.18s ease, transform 0.18s ease;
    overflow: hidden;
    position: relative;
}

.sharewise-floating .sharewise-btn .sharewise-label {
    position: absolute;
    left: 44px;
    background: var(--sw-btn-color);
    padding: 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
}

.sharewise-floating .sharewise-btn:hover {
    opacity: 1;
    width: auto;
    padding: 0 14px 0 14px;
    transform: none;
    box-shadow: 4px 0 16px rgba(0,0,0,0.2);
}

.sharewise-floating .sharewise-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Float: rounded caps on first/last */
.sharewise-float-left  .sharewise-buttons .sharewise-btn:first-child { border-radius: 0 8px 0 0; }
.sharewise-float-left  .sharewise-buttons .sharewise-btn:last-child  { border-radius: 0 0 8px 0; }
.sharewise-float-right .sharewise-buttons .sharewise-btn:first-child { border-radius: 8px 0 0 0; }
.sharewise-float-right .sharewise-buttons .sharewise-btn:last-child  { border-radius: 0 0 0 8px; }

/* Flip label direction for right-side float */
.sharewise-float-right .sharewise-btn .sharewise-label {
    left: auto;
    right: 44px;
}
.sharewise-float-right .sharewise-btn:hover {
    flex-direction: row-reverse;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .sharewise-floating { display: none; }
    .sharewise-buttons { gap: 6px; }
    .sharewise-size-large .sharewise-btn { padding: 9px 14px; font-size: 13px; }
}
