/* Rocks WhatsApp Widget Styles */
:root {
    --wa-green: #128C3E;
    --wa-dark: #075E54;
    --wa-white: #ffffff;
    --rocks-gold: #C5A059;
    --rocks-black: #121212;
    --rocks-dark-bg: #1E1E1E;
}

/* Floating Trigger */
.rocks-wa-trigger {
    position: fixed !important;
    bottom: 2rem !important;
    right: 2rem !important;
    width: 3.75rem !important;
    /* 60px */
    height: 3.75rem !important;
    /* 60px */
    background-color: var(--wa-green) !important;
    color: var(--wa-white) !important;
    border-radius: 50% !important;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 99999 !important;
    transition: all 0.3s ease !important;
}

.rocks-wa-trigger svg {
    width: 2.25rem !important;
    /* 36px */
    height: 2.25rem !important;
    /* 36px */
}

.rocks-wa-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 0.375rem 1rem rgba(0, 0, 0, 0.4);
}

.wa-tooltip {
    position: absolute !important;
    right: 7.25rem !important;
    /* 116px - Adjust for 104px trigger */
    background: var(--wa-white) !important;
    color: var(--rocks-black) !important;
    padding: 0.375rem 0.75rem !important;
    /* 6px 12px */
    border-radius: 0.375rem;
    /* 6px */
    font-size: 0.875rem;
    /* 14px */
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
}

.rocks-wa-trigger:hover .wa-tooltip {
    opacity: 1;
}

/* Modal Overlay */
.rocks-wa-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rocks-wa-modal.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.rocks-wa-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(0.25rem);
}

/* Modal Content */
.rocks-wa-content {
    position: relative;
    width: 90%;
    max-width: 25rem;
    /* 400px */
    background: var(--wa-white);
    border-radius: 1.25rem;
    /* 20px */
    overflow: hidden;
    box-shadow: 0 0.625rem 2.5rem rgba(0, 0, 0, 0.2);
    transform: translateY(1.25rem);
    transition: transform 0.3s ease;
    z-index: 10001;
    font-family: 'Inter', sans-serif;
}

.rocks-wa-modal.active .rocks-wa-content {
    transform: translateY(0);
}

.rocks-wa-close {
    position: absolute;
    top: 0.625rem;
    right: 0.9375rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--wa-white);
    cursor: pointer;
    z-index: 2;
}

/* Header */
.rocks-wa-header {
    background: var(--wa-dark);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.9375rem;
    color: var(--wa-white);
}

.wa-avatar img {
    width: 3.125rem;
    height: 3.125rem;
    border-radius: 50%;
    object-fit: contain;
    /* Logo works better contained */
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
}

.wa-header-text h4 {
    margin: 0;
    font-size: 1.125rem;
    /* 18px */
    font-weight: 700;
    color: var(--wa-white);
}

.wa-header-text p {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    /* 12px */
    opacity: 0.8;
}

/* Body */
.rocks-wa-body {
    padding: 1.5rem;
}

.wa-intro {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* Form */
.wa-field-group {
    margin-bottom: 1rem;
}

.wa-field-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.03125rem;
}

.wa-field-group input,
.wa-field-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 0.0625rem solid #ddd;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
    background: #f9f9f9;
}

.wa-field-group input:focus,
.wa-field-group textarea:focus {
    border-color: var(--wa-green);
    background: #fff;
}

.wa-field-group textarea {
    resize: none;
    height: 5rem;
}

.wa-submit-btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--wa-green);
    color: white;
    border: none;
    border-radius: 3.125rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.wa-submit-btn:hover {
    background: var(--wa-dark);
}

.wa-privacy {
    text-align: center;
    font-size: 0.6875rem;
    color: #999;
    margin-top: 0.75rem;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .rocks-wa-trigger {
        bottom: 1.5rem !important;
        right: 1.5rem !important;
        width: 3.5rem !important;
        /* 56px */
        height: 3.5rem !important;
        /* 56px */
    }

    .rocks-wa-trigger svg {
        width: 2rem !important;
        /* 32px */
        height: 2rem !important;
        /* 32px */
    }

    /* Hide the floating trigger if the mobile sticky bar is present */
    /* Using both :has and a simple descendant rule to ensure it works */
    body:has(.rocks-mobile-bar) .rocks-wa-trigger,
    body:has(.rocks-mobile-bar) .ht-ctc {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .rocks-wa-content {
        width: 100%;
        max-width: 100%;
        border-radius: 1.25rem 1.25rem 0 0;
        position: absolute;
        bottom: 0;
        top: auto;
        transform: translateY(100%);
    }

    .rocks-wa-modal.active .rocks-wa-content {
        transform: translateY(0);
    }
}