/* Frontend Styles */
.so-comm-buttons {
    margin: 30px 0;
}

.so-comm-buttons h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.so-comm-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.so-comm-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background-color: #0073aa;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.2s;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.so-comm-button .so-comm-icon {
    margin-right: 8px;
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
}

.so-comm-button .so-comm-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.so-comm-button:hover {
    background-color: #005a87;
    transform: translateY(-2px);
    color: #fff !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.so-comm-dropdown {
    position: relative;
    display: inline-block;
}

.so-comm-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background-color: #f0f0f0;
    color: #333 !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
    text-decoration: none;
}

.so-comm-dropdown-toggle:hover {
    background-color: #e0e0e0;
    color: #333 !important;
}

.so-comm-dropdown-toggle:after {
    content: "";
    display: inline-block;
    margin-left: 8px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #333;
    transition: transform 0.3s;
}

.so-comm-dropdown.open .so-comm-dropdown-toggle:after {
    transform: rotate(180deg);
}

.so-comm-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    min-width: 200px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 5px;
    overflow: hidden;
}

.so-comm-dropdown.open .so-comm-dropdown-menu {
    display: block;
    animation: dropdownFade 0.2s ease-out;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.so-comm-dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 15px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #333 !important;
    text-decoration: none;
    font-size: 14px;
}

.so-comm-dropdown-item .so-comm-icon {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.so-comm-dropdown-item .so-comm-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.so-comm-dropdown-item:hover {
    background-color: #f5f5f5;
    color: #000 !important;
}

.so-comm-dropdown-item:not(:last-child) {
    border-bottom: 1px solid #eee;
}

/* Mobile styles */
@media (max-width: 768px) {
    .so-comm-buttons-container {
        flex-direction: column;
        align-items: stretch;
    }

    .so-comm-button,
    .so-comm-dropdown-toggle {
        width: 100%;
        padding: 15px;
        font-size: 18px;
        justify-content: center;
    }

    .so-comm-dropdown {
        width: 100%;
    }

    .so-comm-dropdown-menu {
        width: 100%;
        position: relative;
        right: auto;
        box-shadow: none;
        margin-top: 5px;
        border: 1px solid #ddd;
    }

    .so-comm-dropdown-item {
        padding: 15px;
        font-size: 16px;
    }
}

/* Ensure buttons look good in WooCommerce themes */
.woocommerce .so-comm-button,
.woocommerce .so-comm-dropdown-toggle {
    line-height: 1.5;
    text-align: center;
}

.woocommerce .so-comm-buttons {
    clear: both;
}