/*===========================================
=   IMAGE DOWNLOAD & SHARE - COMPLETE CSS   =
=   PURE CLICK-BASED DROPDOWN (NO HOVER)    =
===========================================*/

/* Container */
.ids-button-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    clear: both;
}

/* Base Button Styles */
.ids-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 22px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    line-height: 1 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}

.ids-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15) !important;
}

.ids-button:active {
    transform: translateY(0) !important;
}

.ids-button i {
    font-size: 16px !important;
}

/* Download Button */
.ids-download-button {
    background: #28a745 !important;
    color: white !important;
}

.ids-download-button:hover {
    background: #218838 !important;
    color: white !important;
}

/* ===== SHARE BUTTON WITH DROPDOWN - PURE CLICK BASED ===== */

/* Share Wrapper */
.ids-share-wrapper {
    position: relative !important;
    display: inline-block !important;
}

/* Share Button */
.ids-share-button {
    background: #007bff !important;
    color: white !important;
    position: relative !important;
    z-index: 20 !important;
    cursor: pointer !important;
}

.ids-share-button:hover {
    background: #0069d9 !important;
    color: white !important;
}

/* Share Button Active State (when dropdown is open) */
.ids-share-button.active {
    background: #0056b3 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Copy URL Button */
.ids-copy-button {
    background: #6c757d !important;
    color: white !important;
    border: none !important;
}

.ids-copy-button:hover {
    background: #5a6268 !important;
    color: white !important;
}

/* ===== DROPDOWN MENU - NO HOVER EFFECTS ===== */

/* Main dropdown container - hidden by default */
.ids-share-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    margin-top: 0 !important;
    min-width: 220px !important;
    background: white !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    border-top: none !important;
    border-radius: 0 0 8px 8px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    z-index: 10 !important;
    padding: 8px 0 !important;
    display: none !important;  /* Hidden by default - NO HOVER */
}

/* Show dropdown ONLY when active class is applied */
.ids-share-wrapper.active .ids-share-dropdown {
    display: block !important;
    animation: ids-fadeIn 0.3s ease;
}

/* IMPORTANT: Remove all hover effects on dropdown */
.ids-share-wrapper:hover .ids-share-dropdown,
.ids-share-dropdown:hover {
    /* Empty - NO HOVER EFFECTS */
}

/* Dropdown for right position */
.ids-dropdown-right .ids-share-dropdown {
    left: auto !important;
    right: 0 !important;
}

/* Share Links inside dropdown */
.ids-share-link {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 18px !important;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    border-left: 4px solid transparent !important;
    cursor: pointer !important;
    background: transparent !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 30 !important;
}

.ids-share-link:hover {
    background: #f8f9fa !important;
    color: #333 !important;
    border-left-color: #007bff !important;
    text-decoration: none !important;
    transform: translateX(3px) !important;
}

.ids-share-link i {
    width: 20px !important;
    text-align: center !important;
    font-size: 16px !important;
}

/* Platform Icon Colors */
.ids-share-facebook i { color: #4267B2; }
.ids-share-twitter i { color: #1DA1F2; }
.ids-share-pinterest i { color: #BD081C; }
.ids-share-linkedin i { color: #0077B5; }
.ids-share-whatsapp i { color: #25D366; }
.ids-share-telegram i { color: #0088cc; }
.ids-share-reddit i { color: #ff4500; }
.ids-share-email i { color: #6c757d; }

/* Hover effects for share links */
.ids-share-link:hover i {
    color: #007bff !important;
}

/* First and last items in dropdown */
.ids-share-link:first-child {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.ids-share-link:last-child {
    border-bottom-left-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
}

/* ===== BUTTON STYLES ===== */

/* Rounded Style */
.ids-style-rounded .ids-button {
    border-radius: 50px !important;
}

.ids-style-rounded .ids-share-button.active {
    border-radius: 50px 50px 0 0 !important;
}

.ids-style-rounded .ids-share-dropdown {
    border-radius: 0 0 50px 50px !important;
}

/* Outline Style */
.ids-style-outline .ids-download-button {
    background: transparent !important;
    color: #28a745 !important;
    border: 2px solid #28a745 !important;
}

.ids-style-outline .ids-download-button:hover {
    background: #28a745 !important;
    color: white !important;
}

.ids-style-outline .ids-share-button {
    background: transparent !important;
    color: #007bff !important;
    border: 2px solid #007bff !important;
}

.ids-style-outline .ids-share-button.active {
    background: #007bff !important;
    color: white !important;
    border-bottom: none !important;
}

.ids-style-outline .ids-share-dropdown {
    border: 2px solid #007bff !important;
    border-top: none !important;
    background: white !important;
}

.ids-style-outline .ids-copy-button {
    background: transparent !important;
    color: #6c757d !important;
    border: 2px solid #6c757d !important;
}

.ids-style-outline .ids-copy-button:hover {
    background: #6c757d !important;
    color: white !important;
}

/* ===== NOTIFICATION ===== */
.ids-notification {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #28a745;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 99999;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.ids-notification.ids-show {
    transform: translateX(0);
    opacity: 1;
}

.ids-notification.error {
    background: #dc3545;
}

/* ===== ANIMATIONS ===== */
@keyframes ids-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ids-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ids-loading i {
    animation: ids-spin 1s linear infinite;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .ids-button-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .ids-button {
        width: 100%;
        justify-content: center;
    }
    
    .ids-share-wrapper {
        width: 100%;
    }
    
    .ids-share-button {
        width: 100%;
    }
    
    .ids-share-dropdown {
        width: 100%;
        position: static;
        margin-top: 2px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        border-radius: 4px !important;
        border-top: 1px solid rgba(0,0,0,0.1) !important;
    }
    
    .ids-share-wrapper.active .ids-share-dropdown {
        display: block;
    }
    
    .ids-dropdown-left .ids-share-dropdown,
    .ids-dropdown-right .ids-share-dropdown {
        left: 0;
        right: auto;
    }
}

/* ===== ACCESSIBILITY ===== */
.ids-button:focus-visible,
.ids-share-link:focus-visible {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

.ids-button:focus:not(:focus-visible) {
    outline: none;
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .ids-button-container {
        border-top-color: #404040;
        border-bottom-color: #404040;
    }
    
    .ids-share-dropdown {
        background: #2d2d2d;
        border-color: #404040;
        border-top: none !important;
    }
    
    .ids-share-link {
        color: #e0e0e0;
    }
    
    .ids-share-link:hover {
        background: #3d3d3d;
        color: #fff;
    }
    
    .ids-style-outline .ids-share-dropdown {
        background: #2d2d2d;
        border-color: #007bff !important;
    }
}