/**
 * VIME Button Widget Styles
 *
 * @package VimeDigitalDashboard
 * @subpackage Elementor\Assets
 * @since 2.9.3
 */

/* ============================================
   BASE STYLES
   ============================================ */

.vime-button-wrapper {
    display: inline-flex;
    position: relative;
}

.vime-button-wrapper--full-width {
    display: flex;
    width: 100%;
}

.vime-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    line-height: 1;
    box-sizing: border-box;
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.vime-button:hover {
    text-decoration: none;
}

.vime-button--full-width {
    width: 100%;
}

.vime-button__content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.vime-button__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, color 0.3s ease;
}

.vime-button__icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.vime-button__text {
    white-space: nowrap;
}

/* ============================================
   SIZE PRESETS
   ============================================ */

.vime-button--xs {
    padding: 6px 14px;
    font-size: 12px;
}

.vime-button--sm {
    padding: 8px 20px;
    font-size: 13px;
}

.vime-button--md {
    padding: 12px 28px;
    font-size: 15px;
}

.vime-button--lg {
    padding: 16px 36px;
    font-size: 17px;
}

.vime-button--xl {
    padding: 20px 48px;
    font-size: 20px;
}

/* ============================================
   SHAPE PRESETS
   ============================================ */

.vime-button--square {
    border-radius: 0;
}

.vime-button--rounded {
    border-radius: 6px;
}

.vime-button--pill {
    border-radius: 50px;
}

.vime-button--circle {
    border-radius: 50%;
    padding: 0;
}

.vime-button--circle.vime-button--xs { width: 32px; height: 32px; }
.vime-button--circle.vime-button--sm { width: 40px; height: 40px; }
.vime-button--circle.vime-button--md { width: 48px; height: 48px; }
.vime-button--circle.vime-button--lg { width: 56px; height: 56px; }
.vime-button--circle.vime-button--xl { width: 64px; height: 64px; }

/* ============================================
   ICON-ONLY MODE
   ============================================ */

.vime-button--icon-only .vime-button__text {
    display: none;
}

.vime-button--icon-only .vime-button__content {
    gap: 0;
}

/* ============================================
   STYLE PRESETS
   ============================================ */

/* Primary */
.vime-button--primary {
    background: #7C3AED;
    color: #FFFFFF;
    border: 2px solid #7C3AED;
}
.vime-button--primary:hover {
    background: #6D28D9;
    border-color: #6D28D9;
    color: #FFFFFF;
}

/* Secondary */
.vime-button--secondary {
    background: #6B7280;
    color: #FFFFFF;
    border: 2px solid #6B7280;
}
.vime-button--secondary:hover {
    background: #4B5563;
    border-color: #4B5563;
    color: #FFFFFF;
}

/* Success */
.vime-button--success {
    background: #059669;
    color: #FFFFFF;
    border: 2px solid #059669;
}
.vime-button--success:hover {
    background: #047857;
    border-color: #047857;
    color: #FFFFFF;
}

/* Danger */
.vime-button--danger {
    background: #DC2626;
    color: #FFFFFF;
    border: 2px solid #DC2626;
}
.vime-button--danger:hover {
    background: #B91C1C;
    border-color: #B91C1C;
    color: #FFFFFF;
}

/* Warning */
.vime-button--warning {
    background: #D97706;
    color: #FFFFFF;
    border: 2px solid #D97706;
}
.vime-button--warning:hover {
    background: #B45309;
    border-color: #B45309;
    color: #FFFFFF;
}

/* Info */
.vime-button--info {
    background: #0284C7;
    color: #FFFFFF;
    border: 2px solid #0284C7;
}
.vime-button--info:hover {
    background: #0369A1;
    border-color: #0369A1;
    color: #FFFFFF;
}

/* Outline Primary */
.vime-button--outline-primary {
    background: transparent;
    color: #7C3AED;
    border: 2px solid #7C3AED;
}
.vime-button--outline-primary:hover {
    background: #7C3AED;
    color: #FFFFFF;
}

/* Outline Secondary */
.vime-button--outline-secondary {
    background: transparent;
    color: #6B7280;
    border: 2px solid #6B7280;
}
.vime-button--outline-secondary:hover {
    background: #6B7280;
    color: #FFFFFF;
}

/* Ghost */
.vime-button--ghost {
    background: transparent;
    color: #7C3AED;
    border: 2px solid transparent;
}
.vime-button--ghost:hover {
    background: rgba(124, 58, 237, 0.1);
    color: #6D28D9;
}

/* Gradient Purple */
.vime-button--gradient-purple {
    background: linear-gradient(135deg, #7C3AED, #EC4899);
    color: #FFFFFF;
    border: 2px solid transparent;
}
.vime-button--gradient-purple:hover {
    background: linear-gradient(135deg, #6D28D9, #DB2777);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

/* Gradient Blue */
.vime-button--gradient-blue {
    background: linear-gradient(135deg, #2563EB, #06B6D4);
    color: #FFFFFF;
    border: 2px solid transparent;
}
.vime-button--gradient-blue:hover {
    background: linear-gradient(135deg, #1D4ED8, #0891B2);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

/* Gradient Sunset */
.vime-button--gradient-sunset {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    color: #FFFFFF;
    border: 2px solid transparent;
}
.vime-button--gradient-sunset:hover {
    background: linear-gradient(135deg, #D97706, #DC2626);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* Dark */
.vime-button--dark {
    background: #1F2937;
    color: #FFFFFF;
    border: 2px solid #1F2937;
}
.vime-button--dark:hover {
    background: #111827;
    border-color: #111827;
    color: #FFFFFF;
}

/* Light */
.vime-button--light {
    background: #F3F4F6;
    color: #1F2937;
    border: 2px solid #F3F4F6;
}
.vime-button--light:hover {
    background: #E5E7EB;
    border-color: #E5E7EB;
    color: #111827;
}

/* ============================================
   HOVER ANIMATIONS
   ============================================ */

.vime-button--hover-grow:hover {
    transform: scale(1.05);
}

.vime-button--hover-shrink:hover {
    transform: scale(0.95);
}

.vime-button--hover-float:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.vime-button--hover-sink:hover {
    transform: translateY(4px);
}

.vime-button--hover-icon-forward:hover .vime-button__icon {
    transform: translateX(4px);
}

.vime-button--hover-icon-backward:hover .vime-button__icon {
    transform: translateX(-4px);
}

/* ============================================
   CONTINUOUS ANIMATIONS (Keyframes)
   ============================================ */

/* Pulse */
@keyframes vime-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.vime-button--anim-pulse {
    animation: vime-pulse 2s ease-in-out infinite;
}

/* Shine */
@keyframes vime-shine {
    0% { left: -100%; }
    50%, 100% { left: 200%; }
}
.vime-button--anim-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: vime-shine 3s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

/* Glow */
@keyframes vime-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(124, 58, 237, 0.3); }
    50% { box-shadow: 0 0 20px rgba(124, 58, 237, 0.6), 0 0 40px rgba(124, 58, 237, 0.3); }
}
.vime-button--anim-glow {
    animation: vime-glow 2s ease-in-out infinite;
}

/* Bounce */
@keyframes vime-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.vime-button--anim-bounce {
    animation: vime-bounce 2s ease-in-out infinite;
}

/* ============================================
   ENTRANCE ANIMATIONS (Keyframes)
   ============================================ */

@keyframes vime-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes vime-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes vime-slide-left {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes vime-slide-right {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes vime-bounce-in {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

@keyframes vime-zoom-in {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

/* Entrance classes applied via JS IntersectionObserver */
.vime-button--entrance-fade-in {
    animation: vime-fade-in 0.6s ease-out both;
}

.vime-button--entrance-slide-up {
    animation: vime-slide-up 0.6s ease-out both;
}

.vime-button--entrance-slide-left {
    animation: vime-slide-left 0.6s ease-out both;
}

.vime-button--entrance-slide-right {
    animation: vime-slide-right 0.6s ease-out both;
}

.vime-button--entrance-bounce-in {
    animation: vime-bounce-in 0.8s ease-out both;
}

.vime-button--entrance-zoom-in {
    animation: vime-zoom-in 0.5s ease-out both;
}

/* Hidden state before entrance animation triggers */
.vime-button[data-animation]:not([data-animation=""]):not([data-animation="none"]):not(.vime-button--entrance-fade-in):not(.vime-button--entrance-slide-up):not(.vime-button--entrance-slide-left):not(.vime-button--entrance-slide-right):not(.vime-button--entrance-bounce-in):not(.vime-button--entrance-zoom-in) {
    opacity: 0;
}

/* ============================================
   BADGE
   ============================================ */

.vime-button__badge {
    position: absolute;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: #EF4444;
    color: #FFFFFF;
    line-height: 1.4;
    white-space: nowrap;
    z-index: 2;
    pointer-events: none;
}

.vime-button__badge--top-right {
    top: -10px;
    right: -10px;
}

.vime-button__badge--top-left {
    top: -10px;
    left: -10px;
}

.vime-button__badge--bottom-right {
    bottom: -10px;
    right: -10px;
}

.vime-button__badge--bottom-left {
    bottom: -10px;
    left: -10px;
}
