/* Floating Social Media Buttons - Shared Styles */

/* Main container - positioned based on data-position */
.canvon-fb-preview-icons {
    position: fixed;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
    z-index: 9999;
}

/* Position */
.canvon-fb-preview-icons[data-position="left"] {
    left: 30px;
}

.canvon-fb-preview-icons[data-position="right"] {
    right: 30px;
}

/* Size variations */
.canvon-fb-preview-icons[data-size="S"] .canvon-fb-preview-icon,
.canvon-fb-preview-icons[data-size="S"] .canvon-fb-preview-info-icon,
.canvon-fb-preview-icons[data-size="S"] .canvon-fb-preview-close {
    width: 40px;
    height: 40px;
}

.canvon-fb-preview-icons[data-size="S"] .canvon-fb-preview-icon svg,
.canvon-fb-preview-icons[data-size="S"] .canvon-fb-preview-info-icon svg {
    width: 20px;
    height: 20px;
}

.canvon-fb-preview-icons[data-size="M"] .canvon-fb-preview-icon,
.canvon-fb-preview-icons[data-size="M"] .canvon-fb-preview-info-icon,
.canvon-fb-preview-icons[data-size="M"] .canvon-fb-preview-close {
    width: 50px;
    height: 50px;
}

.canvon-fb-preview-icons[data-size="M"] .canvon-fb-preview-icon svg,
.canvon-fb-preview-icons[data-size="M"] .canvon-fb-preview-info-icon svg {
    width: 25px;
    height: 25px;
}

.canvon-fb-preview-icons[data-size="L"] .canvon-fb-preview-icon,
.canvon-fb-preview-icons[data-size="L"] .canvon-fb-preview-info-icon,
.canvon-fb-preview-icons[data-size="L"] .canvon-fb-preview-close {
    width: 60px;
    height: 60px;
}

.canvon-fb-preview-icons[data-size="L"] .canvon-fb-preview-icon svg,
.canvon-fb-preview-icons[data-size="L"] .canvon-fb-preview-info-icon svg {
    width: 30px;
    height: 30px;
}

.canvon-fb-preview-icons[data-size="XL"] .canvon-fb-preview-icon,
.canvon-fb-preview-icons[data-size="XL"] .canvon-fb-preview-info-icon,
.canvon-fb-preview-icons[data-size="XL"] .canvon-fb-preview-close {
    width: 70px;
    height: 70px;
}

.canvon-fb-preview-icons[data-size="XL"] .canvon-fb-preview-icon svg,
.canvon-fb-preview-icons[data-size="XL"] .canvon-fb-preview-info-icon svg {
    width: 35px;
    height: 35px;
}

/* Shape variations */
.canvon-fb-preview-icons[data-shape="round"] .canvon-fb-preview-icon,
.canvon-fb-preview-icons[data-shape="round"] .canvon-fb-preview-info-icon,
.canvon-fb-preview-icons[data-shape="round"] .canvon-fb-preview-close {
    border-radius: 50%;
}

.canvon-fb-preview-icons[data-shape="square"] .canvon-fb-preview-icon,
.canvon-fb-preview-icons[data-shape="square"] .canvon-fb-preview-info-icon,
.canvon-fb-preview-icons[data-shape="square"] .canvon-fb-preview-close {
    border-radius: 0;
}

/* Collapsed state - hide icons and close button, show only info icon */
.canvon-fb-preview-icons:not(.expanded) .canvon-fb-preview-icon {
    display: none;
}

.canvon-fb-preview-icons:not(.expanded) .canvon-fb-preview-close {
    display: none;
}

/* Expanded state - hide info icon and widget text */
.canvon-fb-preview-icons.expanded .canvon-fb-preview-info-icon,
.canvon-fb-preview-icons.expanded .canvon-fb-widget-with-text,
.canvon-fb-preview-icons.expanded .canvon-fb-widget-text {
    display: none;
}

/* Expanded state - no background, just spacing */
.canvon-fb-preview-icons.expanded {
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
}

/* Individual social media icon */
.canvon-fb-preview-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
}

button.canvon-fb-preview-icon {
    border: 0;
    padding: 0;
}

.canvon-fb-preview-icon:hover {
    transform: scale(1.05);
}

.canvon-fb-preview-icon svg {
    width: 25px;
    height: 25px;
    fill: white;
}

/* Widget with text wrapper */
.canvon-fb-widget-with-text {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Widget text bubble */
.canvon-fb-widget-text {
    background: white;
    color: #1d2327;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

/* Info icon for collapsed state (2+ buttons) */
.canvon-fb-preview-info-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #3F9166;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s;
}

.canvon-fb-preview-info-icon:hover {
    transform: scale(1.05);
}

.canvon-fb-preview-info-icon svg {
    width: 25px;
    height: 25px;
}

/* Close button for expanded state */
.canvon-fb-preview-close {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #3F9166;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 5px;
}

.canvon-fb-preview-close:hover {
    transform: scale(1.05);
}

.canvon-fb-preview-close svg {
    width: 20px;
    height: 20px;
    stroke: white;
    fill: none;
    stroke-width: 3;
}

/* Platform colors */
.canvon-fb-facebook {
    background: #1877F2;
}

.canvon-fb-twitter {
    background: #000000;
}

.canvon-fb-instagram {
    background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4);
}

.canvon-fb-youtube {
    background: #FF0000;
}

.canvon-fb-linkedin {
    background: #0A66C2;
}

.canvon-fb-pinterest {
    background: #E60023;
}

.canvon-fb-snapchat {
    background: #FFFC00;
}

.canvon-fb-tiktok {
    background: #000000;
}

.canvon-fb-whatsapp {
    background: #25D366;
}

.canvon-fb-telegram {
    background: #0088cc;
}

.canvon-fb-reddit {
    background: #FF4500;
}

.canvon-fb-discord {
    background: #5865F2;
}

.canvon-fb-twitch {
    background: #9146FF;
}

.canvon-fb-github {
    background: #181717;
}

.canvon-fb-phone {
    background: #25D366;
}

.canvon-fb-email {
    background: #EA4335;
}

.canvon-fb-line {
    background: #00B900;
}

.canvon-fb-wechat {
    background: #09B83E;
}

.canvon-fb-kakao {
    background: #FEE500;
}

.canvon-fb-threads {
    background: #000000;
}

/* Snapchat and Kakao need black icon due to yellow background */
.canvon-fb-snapchat svg,
.canvon-fb-kakao svg {
    fill: #000 !important;
}

.canvon-fb-kakao svg text {
    fill: #FEE500 !important;
}

.canvon-fb-wechat-contact-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 10000;
}

.canvon-fb-wechat-contact-modal.open {
    display: flex;
}

.canvon-fb-wechat-contact-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
}

.canvon-fb-wechat-contact-panel {
    position: relative;
    width: min(320px, calc(100vw - 40px));
    background: #fff;
    color: #1d2327;
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
    padding: 22px;
    text-align: center;
}

.canvon-fb-wechat-contact-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: #646970;
    font-size: 24px;
    line-height: 24px;
    cursor: pointer;
}

.canvon-fb-wechat-contact-panel h2 {
    margin: 0 0 14px;
    font-size: 22px;
    line-height: 1.2;
}

.canvon-fb-wechat-contact-qr {
    display: block;
    width: 180px;
    height: 180px;
    object-fit: contain;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    margin: 0 auto 16px;
}

.canvon-fb-wechat-contact-label {
    margin: 0 0 6px;
    color: #646970;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.canvon-fb-wechat-contact-id {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.canvon-fb-wechat-contact-id code {
    max-width: 170px;
    overflow-wrap: anywhere;
    background: #f6f7f7;
    border-radius: 4px;
    padding: 7px 9px;
    font-size: 14px;
}

.canvon-fb-wechat-contact-id button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 4px;
    border: 0;
    background: #09B83E;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    padding: 7px 12px;
    cursor: pointer;
}

.canvon-fb-wechat-contact-note {
    margin: 0 0 14px;
    color: #646970;
    font-size: 13px;
    line-height: 1.4;
}
