/**
 * Wisuda Share - Premium Stylesheet
 * Version: 1.0.0
 * 
 * PENTING: Floating buttons TIDAK tampil di mobile/responsive
 */

/* ============================================
   BASE CONTAINER STYLES
   ============================================ */
.wisuda-share-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    align-items: center;
}

/* Alignment */
.wisuda-align-left {
    justify-content: flex-start;
}

.wisuda-align-center {
    justify-content: center;
}

.wisuda-align-right {
    justify-content: flex-end;
}

/* Title */
.wisuda-share-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-right: 10px;
}

/* Hide Labels Class */
.wisuda-hide-labels .wisuda-share-label {
    display: none !important;
}

/* ============================================
   SHARE BUTTON BASE
   ============================================ */
.wisuda-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    border: none;
    outline: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wisuda-share-btn:hover,
.wisuda-share-btn:focus {
    text-decoration: none;
    color: #ffffff;
}

.wisuda-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wisuda-share-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.wisuda-share-label {
    margin-left: 8px;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

/* ============================================
   BUTTON STYLES
   ============================================ */
.wisuda-style-rounded .wisuda-share-btn {
    border-radius: 8px;
    padding: 10px 16px;
}

.wisuda-style-square .wisuda-share-btn {
    border-radius: 0;
    padding: 10px 16px;
}

.wisuda-style-circle .wisuda-share-btn {
    border-radius: 50%;
    padding: 12px;
}

.wisuda-style-circle .wisuda-share-label {
    display: none;
}

/* ============================================
   BUTTON SIZES
   ============================================ */
/* Small */
.wisuda-size-small .wisuda-share-btn {
    padding: 8px 12px;
    font-size: 12px;
}

.wisuda-size-small .wisuda-share-btn svg {
    width: 16px;
    height: 16px;
}

.wisuda-size-small.wisuda-style-circle .wisuda-share-btn {
    width: 36px;
    height: 36px;
    padding: 0;
}

/* Medium */
.wisuda-size-medium .wisuda-share-btn {
    padding: 10px 16px;
    font-size: 14px;
}

.wisuda-size-medium .wisuda-share-btn svg {
    width: 20px;
    height: 20px;
}

.wisuda-size-medium.wisuda-style-circle .wisuda-share-btn {
    width: 44px;
    height: 44px;
    padding: 0;
}

/* Large */
.wisuda-size-large .wisuda-share-btn {
    padding: 14px 20px;
    font-size: 16px;
}

.wisuda-size-large .wisuda-share-btn svg {
    width: 24px;
    height: 24px;
}

.wisuda-size-large.wisuda-style-circle .wisuda-share-btn {
    width: 52px;
    height: 52px;
    padding: 0;
}

/* ============================================
   SOCIAL NETWORK COLORS
   ============================================ */
.wisuda-share-facebook {
    background-color: #1877f2;
}
.wisuda-share-facebook:hover {
    background-color: #145dbf;
}

.wisuda-share-twitter {
    background-color: #000000;
}
.wisuda-share-twitter:hover {
    background-color: #333333;
}

.wisuda-share-whatsapp {
    background-color: #25d366;
}
.wisuda-share-whatsapp:hover {
    background-color: #1da851;
}

.wisuda-share-telegram {
    background-color: #0088cc;
}
.wisuda-share-telegram:hover {
    background-color: #006699;
}

.wisuda-share-linkedin {
    background-color: #0077b5;
}
.wisuda-share-linkedin:hover {
    background-color: #005885;
}

.wisuda-share-pinterest {
    background-color: #bd081c;
}
.wisuda-share-pinterest:hover {
    background-color: #8c0615;
}

.wisuda-share-reddit {
    background-color: #ff4500;
}
.wisuda-share-reddit:hover {
    background-color: #cc3700;
}

.wisuda-share-tumblr {
    background-color: #35465c;
}
.wisuda-share-tumblr:hover {
    background-color: #283848;
}

.wisuda-share-pocket {
    background-color: #ef3f56;
}
.wisuda-share-pocket:hover {
    background-color: #d92e45;
}

.wisuda-share-email {
    background-color: #7d7d7d;
}
.wisuda-share-email:hover {
    background-color: #5d5d5d;
}

.wisuda-share-copy {
    background-color: #333333;
}
.wisuda-share-copy:hover {
    background-color: #1a1a1a;
}

.wisuda-share-print {
    background-color: #555555;
}
.wisuda-share-print:hover {
    background-color: #333333;
}

.wisuda-share-line {
    background-color: #00c300;
}
.wisuda-share-line:hover {
    background-color: #00a000;
}

.wisuda-share-viber {
    background-color: #665cac;
}
.wisuda-share-viber:hover {
    background-color: #524a8a;
}

.wisuda-share-flipboard {
    background-color: #e12828;
}
.wisuda-share-flipboard:hover {
    background-color: #b82020;
}

.wisuda-share-mix {
    background-color: #ff8126;
}
.wisuda-share-mix:hover {
    background-color: #e06b15;
}

.wisuda-share-threads {
    background-color: #000000;
}
.wisuda-share-threads:hover {
    background-color: #333333;
}

.wisuda-share-mastodon {
    background-color: #6364ff;
}
.wisuda-share-mastodon:hover {
    background-color: #4e4fd9;
}

.wisuda-share-bluesky {
    background-color: #0085ff;
}
.wisuda-share-bluesky:hover {
    background-color: #0070d9;
}

/* ============================================
   HOVER ANIMATIONS
   ============================================ */
/* Lift */
.wisuda-animation-lift .wisuda-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Grow */
.wisuda-animation-grow .wisuda-share-btn:hover {
    transform: scale(1.1);
}

/* Shake */
@keyframes wisuda-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.wisuda-animation-shake .wisuda-share-btn:hover {
    animation: wisuda-shake 0.5s ease-in-out;
}

/* Pulse */
@keyframes wisuda-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.wisuda-animation-pulse .wisuda-share-btn:hover {
    animation: wisuda-pulse 0.6s ease-in-out;
}

/* Slide (for floating) */
.wisuda-animation-slide .wisuda-share-btn:hover {
    transform: translateX(5px);
}

.wisuda-floating-right .wisuda-animation-slide .wisuda-share-btn:hover {
    transform: translateX(-5px);
}

/* ============================================
   ENTRANCE ANIMATIONS
   ============================================ */
@keyframes wisuda-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.wisuda-share-standard .wisuda-share-btn {
    animation: wisuda-fadeIn 0.4s ease forwards;
}

.wisuda-share-standard .wisuda-share-btn:nth-child(1) { animation-delay: 0s; }
.wisuda-share-standard .wisuda-share-btn:nth-child(2) { animation-delay: 0.05s; }
.wisuda-share-standard .wisuda-share-btn:nth-child(3) { animation-delay: 0.1s; }
.wisuda-share-standard .wisuda-share-btn:nth-child(4) { animation-delay: 0.15s; }
.wisuda-share-standard .wisuda-share-btn:nth-child(5) { animation-delay: 0.2s; }
.wisuda-share-standard .wisuda-share-btn:nth-child(6) { animation-delay: 0.25s; }
.wisuda-share-standard .wisuda-share-btn:nth-child(7) { animation-delay: 0.3s; }
.wisuda-share-standard .wisuda-share-btn:nth-child(8) { animation-delay: 0.35s; }

/* ============================================
   FLOATING BUTTONS - DESKTOP ONLY
   ============================================ */
.wisuda-share-floating {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    padding: 10px;
}

.wisuda-floating-left {
    left: 0;
}

.wisuda-floating-right {
    right: 0;
}

.wisuda-share-floating .wisuda-share-container {
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.wisuda-share-floating .wisuda-share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.wisuda-share-floating .wisuda-share-label {
    display: none;
}

.wisuda-share-floating .wisuda-share-btn svg {
    width: 24px;
    height: 24px;
}

/* Floating Size Variants */
.wisuda-share-floating.wisuda-size-small .wisuda-share-btn {
    width: 40px;
    height: 40px;
}

.wisuda-share-floating.wisuda-size-small .wisuda-share-btn svg {
    width: 20px;
    height: 20px;
}

.wisuda-share-floating.wisuda-size-large .wisuda-share-btn {
    width: 60px;
    height: 60px;
}

.wisuda-share-floating.wisuda-size-large .wisuda-share-btn svg {
    width: 28px;
    height: 28px;
}

/* Floating entrance animation */
@keyframes wisuda-slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes wisuda-slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.wisuda-floating-left .wisuda-share-btn {
    animation: wisuda-slideInLeft 0.4s ease forwards;
}

.wisuda-floating-right .wisuda-share-btn {
    animation: wisuda-slideInRight 0.4s ease forwards;
}

.wisuda-share-floating .wisuda-share-btn:nth-child(1) { animation-delay: 0s; }
.wisuda-share-floating .wisuda-share-btn:nth-child(2) { animation-delay: 0.1s; }
.wisuda-share-floating .wisuda-share-btn:nth-child(3) { animation-delay: 0.2s; }
.wisuda-share-floating .wisuda-share-btn:nth-child(4) { animation-delay: 0.3s; }
.wisuda-share-floating .wisuda-share-btn:nth-child(5) { animation-delay: 0.4s; }
.wisuda-share-floating .wisuda-share-btn:nth-child(6) { animation-delay: 0.5s; }

/* ============================================
   RESPONSIVE - CRITICAL RULES
   ============================================ */

/*
 * DEFAULT: HIDE FLOATING ON MOBILE/TABLET
 * Ini yang memperbaiki masalah overlap pada screenshot
 */
@media (max-width: 768px) {
    /* SEMBUNYIKAN FLOATING BUTTONS DI MOBILE */
    .wisuda-share-floating {
        display: none !important;
    }
    
    /* Standard buttons adjustments */
    .wisuda-share-standard .wisuda-share-container {
        justify-content: center;
    }
    
    /* Hide labels on mobile for cleaner look */
    .wisuda-share-standard .wisuda-share-label {
        display: none;
    }
    
    /* Make buttons circular on mobile */
    .wisuda-share-standard.wisuda-style-rounded .wisuda-share-btn,
    .wisuda-share-standard.wisuda-style-square .wisuda-share-btn {
        padding: 12px;
        border-radius: 50%;
    }
    
    /* Smaller gap on mobile */
    .wisuda-share-container {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .wisuda-share-container {
        gap: 6px;
    }
    
    .wisuda-size-medium .wisuda-share-btn {
        padding: 10px;
    }
    
    .wisuda-size-medium .wisuda-share-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .wisuda-size-large .wisuda-share-btn {
        padding: 12px;
    }
    
    .wisuda-size-large .wisuda-share-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* ============================================
   COPY LINK NOTIFICATION
   ============================================ */
.wisuda-copy-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    animation: wisuda-notifyIn 0.3s ease, wisuda-notifyOut 0.3s ease 2.7s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wisuda-copy-notification::before {
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #25d366;
    border-radius: 50%;
    font-size: 14px;
}

@keyframes wisuda-notifyIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wisuda-notifyOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.wisuda-share-btn:focus {
    outline: 3px solid #4a90e2;
    outline-offset: 2px;
}

.wisuda-share-btn:focus:not(:focus-visible) {
    outline: none;
}

.wisuda-share-btn:focus-visible {
    outline: 3px solid #4a90e2;
    outline-offset: 2px;
}

.wisuda-share-btn:active {
    transform: scale(0.95);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wisuda-share-btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wisuda-share-btn,
    .wisuda-share-floating .wisuda-share-btn {
        animation: none;
        transition: none;
    }
    
    .wisuda-share-btn:hover {
        transform: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .wisuda-share-container,
    .wisuda-share-floating,
    .wisuda-copy-notification {
        display: none !important;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */
@media (prefers-color-scheme: dark) {
    .wisuda-share-title {
        color: #e0e0e0;
    }
    
    .wisuda-share-floating .wisuda-share-btn {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    }
}
