/* WDP Showlink Elementor Widget Styles */

.wdpsl-button-wrapper {
    display: inline-block;
    width: 100%;
}

.wdpsl-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 1;
    font-size: 15px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 3px;
    color: #fff;
    background-color: #61ce70;
    fill: #fff;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.wdpsl-button:hover,
.wdpsl-button:focus {
    color: #fff;
    background-color: #3abd5c;
    text-decoration: none;
    transform: translateY(-1px);
}

.wdpsl-button:active {
    transform: translateY(0);
}

/* Button Sizes */
.wdpsl-button-xs {
    font-size: 12px;
    padding: 6px 12px;
    min-height: 28px;
}

.wdpsl-button-sm {
    font-size: 13px;
    padding: 8px 16px;
    min-height: 32px;
}

.wdpsl-button-md {
    font-size: 14px;
    padding: 12px 24px;
    min-height: 40px;
}

.wdpsl-button-lg {
    font-size: 16px;
    padding: 16px 32px;
    min-height: 48px;
}

.wdpsl-button-xl {
    font-size: 18px;
    padding: 20px 40px;
    min-height: 56px;
}

/* Button Text */
.wdpsl-button-text {
    display: inline-block;
    line-height: inherit;
}

/* Button Icons */
.wdpsl-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.wdpsl-button-icon svg,
.wdpsl-button-icon i {
    width: 1em;
    height: 1em;
    font-size: inherit;
    fill: currentColor;
    stroke: currentColor;
    color: inherit;
}

/* Icon Positions */
.wdpsl-button-icon-before {
    margin-right: 8px;
}

.wdpsl-button-icon-after {
    margin-left: 8px;
}

/* Alignment Classes */
.elementor-align-left .wdpsl-button-wrapper {
    text-align: left;
}

.elementor-align-center .wdpsl-button-wrapper {
    text-align: center;
}

.elementor-align-right .wdpsl-button-wrapper {
    text-align: right;
}

.elementor-align-justify .wdpsl-button {
    width: 100%;
}

/* Responsive Alignment */
@media (max-width: 1024px) {
    .elementor-tablet-align-left .wdpsl-button-wrapper {
        text-align: left;
    }
    
    .elementor-tablet-align-center .wdpsl-button-wrapper {
        text-align: center;
    }
    
    .elementor-tablet-align-right .wdpsl-button-wrapper {
        text-align: right;
    }
    
    .elementor-tablet-align-justify .wdpsl-button {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .elementor-mobile-align-left .wdpsl-button-wrapper {
        text-align: left;
    }
    
    .elementor-mobile-align-center .wdpsl-button-wrapper {
        text-align: center;
    }
    
    .elementor-mobile-align-right .wdpsl-button-wrapper {
        text-align: right;
    }
    
    .elementor-mobile-align-justify .wdpsl-button {
        width: 100%;
    }
}

/* Loading State */
.wdpsl-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.wdpsl-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: wdpsl-spin 1s linear infinite;
}

@keyframes wdpsl-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus Styles for Accessibility */
.wdpsl-button:focus {
    outline: 2px solid #005caa;
    outline-offset: 2px;
}

.wdpsl-button:focus:not(:focus-visible) {
    outline: none;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .wdpsl-button {
        border: 2px solid currentColor;
    }
    
    .wdpsl-button:hover,
    .wdpsl-button:focus {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .wdpsl-button,
    .wdpsl-button::after {
        transition: none;
        animation: none;
    }
    
    .wdpsl-button:hover,
    .wdpsl-button:focus {
        transform: none;
    }
}

/* RTL Support */
[dir="rtl"] .wdpsl-button-icon-before {
    margin-right: 0;
    margin-left: 8px;
}

[dir="rtl"] .wdpsl-button-icon-after {
    margin-left: 0;
    margin-right: 8px;
}

/* Print Styles */
@media print {
    .wdpsl-button {
        background: transparent !important;
        color: #000 !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

/* Editor Specific Styles */
.elementor-editor-active .wdpsl-button {
    /* Aktifkan hover effect tapi cegah klik via JS */
    pointer-events: auto;
    cursor: default;
}

.elementor-editor-active .wdpsl-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Pastikan overlay tidak menghalangi hover */
}

.elementor-editor-active .wdpsl-button:hover::before {
    opacity: 1;
}

/* Widget Preview in Editor */
.elementor-widget-wdpsl-showlink-button .elementor-widget-container {
    position: relative;
}

.elementor-widget-wdpsl-showlink-button .elementor-alert {
    margin: 0;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
    font-size: 14px;
}

/* Elementor Panel: Custom icon & badge for Showlink widget */
.elementor-panel .wdpsl-showlink-icon {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 16px;
}

.elementor-panel .wdpsl-showlink-icon::before {
    /* Render provided SVG using data URI; color follows currentColor */
    content: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-box-arrow-up-right' viewBox='0 0 16 16'><path fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5'/><path fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z'/></svg>");
    display: inline-block;
}

.elementor-panel .wdpsl-showlink-icon::after { content: ''; display: none; }

/* Place badge at tile top-right like Elementor's lock icon */
.elementor-panel .elementor-element:has(.wdpsl-showlink-icon),
.elementor-panel .elementor-panel-widget:has(.wdpsl-showlink-icon),
.elementor-panel .elementor-element-item:has(.wdpsl-showlink-icon) {
    position: relative;
}

.elementor-panel .elementor-element:has(.wdpsl-showlink-icon)::after,
.elementor-panel .elementor-panel-widget:has(.wdpsl-showlink-icon)::after,
.elementor-panel .elementor-element-item:has(.wdpsl-showlink-icon)::after {
    content: 'WDP';
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 10px;
    color: #7a00cc;
    background: #fff;
    padding: 2px 4px;
    border: 1px solid #ddd;
    border-radius: 3px;
    line-height: 1;
    z-index: 2;
}

/* Animation Classes (Elementor Hover Animations) */
.elementor-animation-grow:hover {
    transform: scale(1.1) translateY(-1px);
}

.elementor-animation-shrink:hover {
    transform: scale(0.9) translateY(-1px);
}

.elementor-animation-pulse:hover {
    animation: elementor-animation-pulse 1s;
}

@keyframes elementor-animation-pulse {
    25% { transform: scale(1.1); }
    75% { transform: scale(0.9); }
}

.elementor-animation-bounce-in:hover {
    animation: elementor-animation-bounce-in 0.75s;
}

@keyframes elementor-animation-bounce-in {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

.elementor-animation-bounce-out:hover {
    animation: elementor-animation-bounce-out 0.75s;
}

@keyframes elementor-animation-bounce-out {
    20% { transform: scale(0.9); }
    50%, 55% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0; transform: scale(0.3); }
}

.elementor-animation-tada:hover {
    animation: elementor-animation-tada 1s;
}

@keyframes elementor-animation-tada {
    0% { transform: scale(1); }
    10%, 20% { transform: scale(0.9) rotate(-3deg); }
    30%, 50%, 70%, 90% { transform: scale(1.1) rotate(3deg); }
    40%, 60%, 80% { transform: scale(1.1) rotate(-3deg); }
    100% { transform: scale(1) rotate(0); }
}