/**
 * Social Media Contact - Frontend Styles
 */

/* Container positioning */
.smc-container {
    position: fixed;
    z-index: 9999;
}

.smc-position-bottom-right {
    bottom: 30px;
    right: 30px;
}

.smc-position-bottom-left {
    bottom: 30px;
    left: 30px;
}

.smc-position-top-right {
    top: 30px;
    right: 30px;
}

.smc-position-top-left {
    top: 30px;
    left: 30px;
}

/* Main contact button */
.smc-main-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0D6429 0%, #0a4d1f 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(13, 100, 41, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 10;
}

.smc-main-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(13, 100, 41, 0.5);
}

.smc-main-button:active {
    transform: scale(0.95);
}

.smc-main-button svg {
    color: white;
}

.smc-main-button.smc-open .smc-icon {
    display: none;
}

.smc-main-button.smc-open .smc-close-icon {
    display: block !important;
}

/* Pulse animation */
@keyframes smc-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(13, 100, 41, 0.4);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 6px 30px rgba(13, 100, 41, 0.6);
    }
}

.smc-main-button.smc-animated {
    animation: smc-pulse 1.5s ease-in-out infinite;
}

/* Contact options menu */
.smc-menu {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Position menu based on container position */
.smc-position-bottom-right .smc-menu,
.smc-position-bottom-left .smc-menu {
    bottom: 75px;
}

.smc-position-top-right .smc-menu,
.smc-position-top-left .smc-menu {
    top: 75px;
}

.smc-position-bottom-right .smc-menu,
.smc-position-top-right .smc-menu {
    right: 0;
}

.smc-position-bottom-left .smc-menu,
.smc-position-top-left .smc-menu {
    left: 0;
}

/* Menu items - Icon only circles */
.smc-menu-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    padding: 0;
    background: white;
    border-radius: 50%;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.smc-menu-item:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.smc-menu-item svg {
    flex-shrink: 0;
}

/* WhatsApp */
.smc-menu-item.smc-whatsapp:hover {
    background: #25D366;
    color: white;
}

.smc-menu-item.smc-whatsapp svg {
    color: #25D366;
}

.smc-menu-item.smc-whatsapp:hover svg {
    color: white;
}

/* Instagram */
.smc-menu-item.smc-instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.smc-menu-item.smc-instagram svg {
    color: #E4405F;
}

.smc-menu-item.smc-instagram:hover svg {
    color: white;
}

/* Facebook Messenger */
.smc-menu-item.smc-facebook:hover {
    background: #0084FF;
    color: white;
}

.smc-menu-item.smc-facebook svg {
    color: #0084FF;
}

.smc-menu-item.smc-facebook:hover svg {
    color: white;
}

/* Email/Contact */
.smc-menu-item.smc-email:hover {
    background: #0D6429;
    color: white;
}

.smc-menu-item.smc-email svg {
    color: #0D6429;
}

.smc-menu-item.smc-email:hover svg {
    stroke: white;
}

/* Popup message bubble */
.smc-popup-message {
    position: absolute;
    background: white;
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    max-width: 400px;
    width: max-content;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    white-space: normal;
    word-wrap: break-word;
    z-index: 1;

    /* Limit to 3 lines max (250 chars fits well) */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Position popup based on container position - expands away from button */

/* Bottom Right - expand to the left */
.smc-position-bottom-right .smc-popup-message {
    right: 75px;
    bottom: 15px;
}

/* Bottom Left - expand to the right */
.smc-position-bottom-left .smc-popup-message {
    left: 75px;
    bottom: 15px;
}

/* Top Right - expand to the left */
.smc-position-top-right .smc-popup-message {
    right: 75px;
    top: 15px;
}

/* Top Left - expand to the right */
.smc-position-top-left .smc-popup-message {
    left: 75px;
    top: 15px;
}

/* Popup arrow */
.smc-popup-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

/* Arrow positioning for bottom positions */
.smc-position-bottom-right .smc-popup-arrow {
    right: -10px;
    bottom: 20px;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent white;
}

.smc-position-bottom-left .smc-popup-arrow {
    left: -10px;
    bottom: 20px;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

/* Arrow positioning for top positions */
.smc-position-top-right .smc-popup-arrow {
    right: -10px;
    top: 20px;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent white;
}

.smc-position-top-left .smc-popup-arrow {
    left: -10px;
    top: 20px;
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

.smc-popup-content {
    font-weight: 500;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .smc-position-bottom-right,
    .smc-position-top-right {
        right: 20px;
    }

    .smc-position-bottom-left,
    .smc-position-top-left {
        left: 20px;
    }

    .smc-position-bottom-right,
    .smc-position-bottom-left {
        bottom: 20px;
    }

    .smc-position-top-right,
    .smc-position-top-left {
        top: 20px;
    }

    .smc-main-button {
        width: 55px;
        height: 55px;
    }

    .smc-popup-message {
        min-width: 200px;
        max-width: 320px;
        font-size: 13px;
        padding: 10px 14px;
    }

    .smc-menu-item {
        width: 45px;
        height: 45px;
    }

    .smc-menu-item svg {
        width: 20px;
        height: 20px;
    }
}

@media screen and (max-width: 480px) {
    .smc-position-bottom-right,
    .smc-position-top-right {
        right: 15px;
    }

    .smc-position-bottom-left,
    .smc-position-top-left {
        left: 15px;
    }

    .smc-position-bottom-right,
    .smc-position-bottom-left {
        bottom: 15px;
    }

    .smc-main-button {
        width: 50px;
        height: 50px;
    }

    .smc-main-button svg {
        width: 20px;
        height: 20px;
    }

    .smc-popup-message {
        min-width: 180px;
        max-width: 280px;
        font-size: 12px;
        padding: 8px 12px;
        line-height: 1.4;
    }

    .smc-menu-item {
        width: 42px;
        height: 42px;
    }

    .smc-menu-item svg {
        width: 18px;
        height: 18px;
    }
}
