/**
 * WBF Theme Customizations - Main Styles
 * 
 * Base styles for all features. Feature-specific styles are loaded separately.
 */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */
:root {
    --wbf-tc-primary: #25d366;
    --wbf-tc-primary-hover: #128c7e;
    --wbf-tc-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --wbf-tc-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.2);
    --wbf-tc-radius: 50px;
    --wbf-tc-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --wbf-tc-z-index-float: 9990;
    --wbf-tc-z-index-sticky: 9980;
    --wbf-tc-z-index-announcement: 9970;
}

/* ==========================================================================
   Floating WhatsApp Button
   ========================================================================== */
.wbf-tc-whatsapp {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--wbf-tc-z-index-float);
}

.wbf-tc-whatsapp__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--wbf-tc-primary);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    box-shadow: var(--wbf-tc-shadow);
    transition: var(--wbf-tc-transition);
    position: relative;
}

.wbf-tc-whatsapp__button:hover {
    background: var(--wbf-tc-primary-hover);
    transform: scale(1.1);
    box-shadow: var(--wbf-tc-shadow-hover);
    color: #fff;
    text-decoration: none;
}

.wbf-tc-whatsapp__icon {
    width: 32px;
    height: 32px;
}

.wbf-tc-whatsapp__tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--wbf-tc-transition);
    pointer-events: none;
}

.wbf-tc-whatsapp__tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #333;
}

.wbf-tc-whatsapp__button:hover .wbf-tc-whatsapp__tooltip {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Back to Top Button
   ========================================================================== */
.wbf-tc-back-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: var(--wbf-tc-z-index-float);
    width: 48px;
    height: 48px;
    background: #1a1a2e;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    box-shadow: var(--wbf-tc-shadow);
    transition: var(--wbf-tc-transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wbf-tc-back-to-top[data-visible="true"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wbf-tc-back-to-top:hover {
    background: #2d2d44;
    transform: translateY(-2px);
    box-shadow: var(--wbf-tc-shadow-hover);
}

.wbf-tc-back-to-top:active {
    transform: translateY(0);
}

.wbf-tc-back-to-top svg {
    width: 24px;
    height: 24px;
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .wbf-tc-whatsapp {
        bottom: 16px;
        right: 16px;
    }

    .wbf-tc-whatsapp__button {
        width: 52px;
        height: 52px;
    }

    .wbf-tc-whatsapp__icon {
        width: 28px;
        height: 28px;
    }

    .wbf-tc-whatsapp__tooltip {
        display: none;
    }

    .wbf-tc-back-to-top {
        bottom: 16px;
        left: 16px;
        width: 44px;
        height: 44px;
    }
}


/* ==============================================================================
   Canvas Cart Sidebar Fix
   ============================================================================== */
/* When canvas-widget has open class, bring it on screen */
.canvas-widget.canvas-right.open {
    right: 0 !important;
    transform: translateX(0) !important;
}

.canvas-widget.canvas-left.open {
    left: 0 !important;
    transform: translateX(0) !important;
}

/* Add transition for smooth animation */
.canvas-widget {
    transition: right 0.3s ease-in-out, left 0.3s ease-in-out, transform 0.3s ease-in-out !important;
}
