/* ============================================================
   KB Social Share — style.css
   v1.0.0
============================================================ */

/* Container */
.kbss-wrap {
    margin: 40px 0 20px;
    padding: 28px 28px 24px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    overflow: hidden;
}

.kbss-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e91e63, #ff9800, #2196f3, #4caf50, #9c27b0);
    background-size: 300% 100%;
    animation: kbss-rainbow 6s linear infinite;
}

@keyframes kbss-rainbow {
    0%   { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* Header */
.kbss-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.kbss-header-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #e91e63, #f06292);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.kbss-header-icon svg {
    width: 14px;
    height: 14px;
}

.kbss-heading {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    border: none !important;
    line-height: 1.4 !important;
    flex: 1;
}

.kbss-total {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    background: #fff5f7;
    border: 1px solid #fce4ec;
    padding: 4px 12px;
    border-radius: 20px;
}

.kbss-total-num {
    font-size: 14px;
    font-weight: 800;
    color: #e91e63;
}

.kbss-total-label {
    font-size: 11px;
    color: #999;
}

/* Buttons Container */
.kbss-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Base Button */
.kbss-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--kbss-color, #555);
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    border: none;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
    white-space: nowrap;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.kbss-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.18s ease;
}

.kbss-btn:hover {
    background: var(--kbss-color-light, #444) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    text-decoration: none !important;
}

.kbss-btn:hover::before { background: rgba(255,255,255,0.08); }

.kbss-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* Button styles */
.kbss-btn--pill    { border-radius: 50px; padding: 10px 20px; }
.kbss-btn--square  { border-radius: 0; }
.kbss-btn--rounded { border-radius: 8px; }

/* Icon only */
.kbss-btn--icon-only {
    border-radius: 50%;
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
}

.kbss-btn--icon-only .kbss-label { display: none; }

/* Icon */
.kbss-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kbss-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    stroke: currentColor;
}

/* Label */
.kbss-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Instagram — gradient special */
.kbss-btn--instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888) !important;
    --kbss-color: #cc2366;
    --kbss-color-light: #bc1888;
}

.kbss-btn--instagram:hover {
    background: linear-gradient(45deg, #e0842a, #d45e34, #cc1d3b, #bc1d5e, #ad1480) !important;
}

/* Copy button states */
.kbss-btn--copy.copied {
    background: #4caf50 !important;
    --kbss-color-light: #388e3c;
}

/* Toast notification */
.kbss-toast {
    position: absolute;
    bottom: 12px;
    right: 16px;
    background: #323232;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.kbss-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 600px) {
    .kbss-wrap {
        padding: 20px 16px;
    }

    .kbss-btn {
        padding: 9px 14px;
        font-size: 12px;
    }

    .kbss-btn--pill {
        padding: 9px 16px;
    }

    .kbss-heading {
        font-size: 14px !important;
    }

    .kbss-total { display: none; }

    .kbss-buttons { gap: 8px; }
}

@media (max-width: 400px) {
    .kbss-btn {
        flex: 1 1 calc(50% - 4px);
        justify-content: center;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .kbss-wrap {
        background: #1e1e1e;
        border-color: #333;
        box-shadow: 0 2px 16px rgba(0,0,0,0.3);
    }

    .kbss-heading { color: #f0f0f0 !important; }

    .kbss-total {
        background: rgba(233,30,99,0.1);
        border-color: rgba(233,30,99,0.2);
    }
}

/* Print */
@media print {
    .kbss-wrap { display: none !important; }
}
