/**
 * GG WhatsApp Contact - Frontend Styles
 * Author: Numos - https://numos.fr
 */

/* =============================================
   FLOATING BUTTON
   ============================================= */

.gg-wac-button,
button.gg-wac-button,
button#gg-wac-button,
#gg-wac-button {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: #4f7345 !important;
    background-color: #4f7345 !important;
    border: none !important;
    border-width: 0 !important;
    border-color: transparent !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 16px rgba(79, 115, 69, 0.4) !important;
    z-index: 99999 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    color: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

.gg-wac-button:hover,
button.gg-wac-button:hover,
button#gg-wac-button:hover,
#gg-wac-button:hover {
    background: #3d5a36 !important;
    background-color: #3d5a36 !important;
    border: none !important;
    border-width: 0 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(79, 115, 69, 0.5) !important;
    color: #fff !important;
}

.gg-wac-button:focus,
button.gg-wac-button:focus,
#gg-wac-button:focus {
    outline: none !important;
    border: none !important;
}

.gg-wac-button svg,
#gg-wac-button svg {
    width: 28px !important;
    height: 28px !important;
    fill: currentColor !important;
}

/* =============================================
   MODAL OVERLAY
   ============================================= */

.gg-wac-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 100000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    backdrop-filter: blur(2px);
}

.gg-wac-modal-overlay.gg-wac-active {
    opacity: 1;
    visibility: visible;
}

/* =============================================
   MODAL CONTAINER
   ============================================= */

.gg-wac-modal {
    background: #fff !important;
    border-radius: 8px !important;
    max-width: 500px !important;
    width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    position: relative !important;
    transform: translateY(10px);
    transition: transform 0.25s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
}

.gg-wac-modal-overlay.gg-wac-active .gg-wac-modal {
    transform: translateY(0);
}

/* =============================================
   MODAL HEADER
   ============================================= */

.gg-wac-modal-header {
    padding: 24px 24px 16px !important;
    border-bottom: 1px solid #eee !important;
    position: relative !important;
}

.gg-wac-modal-title {
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #333 !important;
    line-height: 1.3 !important;
    padding-right: 30px !important;
}

.gg-wac-modal-intro {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    color: #666 !important;
    line-height: 1.5 !important;
}

/* Close Button - Minimal style */
.gg-wac-modal-close,
button.gg-wac-modal-close,
#gg-wac-modal-close {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    width: 24px !important;
    height: 24px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-width: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0 !important;
    color: #999 !important;
    transition: color 0.2s ease !important;
    outline: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

.gg-wac-modal-close:hover,
button.gg-wac-modal-close:hover,
#gg-wac-modal-close:hover {
    background: transparent !important;
    background-color: transparent !important;
    color: #333 !important;
    border: none !important;
    box-shadow: none !important;
}

.gg-wac-modal-close:focus,
#gg-wac-modal-close:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.gg-wac-modal-close svg,
#gg-wac-modal-close svg {
    width: 18px !important;
    height: 18px !important;
    stroke-width: 2 !important;
}

/* =============================================
   MODAL BODY / FORM
   ============================================= */

.gg-wac-modal-body {
    padding: 24px !important;
}

.gg-wac-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

.gg-wac-form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
}

.gg-wac-form-group {
    display: flex !important;
    flex-direction: column !important;
}

.gg-wac-form-group.gg-wac-full-width {
    grid-column: 1 / -1 !important;
}

.gg-wac-form-label {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333 !important;
    margin-bottom: 6px !important;
    line-height: 1.3 !important;
}

.gg-wac-form-label .gg-wac-required {
    color: #c9a962 !important;
    margin-left: 2px !important;
}

/* Form Inputs */
.gg-wac-form-input,
.gg-wac-form-select,
.gg-wac-form-textarea,
.gg-wac-form input[type="text"],
.gg-wac-form input[type="email"],
.gg-wac-form input[type="tel"],
.gg-wac-form select,
.gg-wac-form textarea {
    padding: 10px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: #333 !important;
    background: #fff !important;
    background-color: #fff !important;
    transition: border-color 0.2s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

.gg-wac-form-input:focus,
.gg-wac-form-select:focus,
.gg-wac-form-textarea:focus,
.gg-wac-form input:focus,
.gg-wac-form select:focus,
.gg-wac-form textarea:focus {
    border-color: #4f7345 !important;
    outline: none !important;
    box-shadow: none !important;
}

.gg-wac-form-input.gg-wac-error,
.gg-wac-form-select.gg-wac-error,
.gg-wac-form-textarea.gg-wac-error {
    border-color: #dc3545 !important;
}

.gg-wac-form-select,
.gg-wac-form select {
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23666' d='M5 6L0 0h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 32px !important;
}

.gg-wac-form-textarea,
.gg-wac-form textarea {
    resize: vertical !important;
    min-height: 70px !important;
}

.gg-wac-form-error-message {
    font-size: 12px !important;
    color: #dc3545 !important;
    margin-top: 4px !important;
    display: none !important;
}

.gg-wac-form-group.gg-wac-has-error .gg-wac-form-error-message {
    display: block !important;
}

/* Section Titles */
.gg-wac-form-separator {
    border: none !important;
    border-top: 1px solid #eee !important;
    margin: 8px 0 !important;
}

.gg-wac-form-section-title {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #4f7345 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin: 8px 0 4px 0 !important;
    padding: 0 !important;
}

/* =============================================
   SUBMIT BUTTON
   ============================================= */

.gg-wac-submit-button,
button.gg-wac-submit-button,
.gg-wac-form button[type="submit"] {
    width: 100% !important;
    padding: 12px 20px !important;
    background: #4f7345 !important;
    background-color: #4f7345 !important;
    color: #fff !important;
    border: none !important;
    border-width: 0 !important;
    border-radius: 4px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: background-color 0.2s ease !important;
    margin-top: 8px !important;
    text-decoration: none !important;
    box-shadow: none !important;
    outline: none !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    min-height: 0 !important;
}

.gg-wac-submit-button:hover,
button.gg-wac-submit-button:hover,
.gg-wac-form button[type="submit"]:hover {
    background: #3d5a36 !important;
    background-color: #3d5a36 !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
}

.gg-wac-submit-button:focus,
.gg-wac-form button[type="submit"]:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.gg-wac-submit-button svg,
.gg-wac-form button[type="submit"] svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 600px) {
    .gg-wac-button,
    button.gg-wac-button,
    #gg-wac-button {
        bottom: 16px !important;
        right: 16px !important;
        width: 56px !important;
        height: 56px !important;
    }

    .gg-wac-button svg,
    #gg-wac-button svg {
        width: 26px !important;
        height: 26px !important;
    }

    .gg-wac-modal-overlay {
        padding: 0 !important;
        align-items: flex-end !important;
    }

    .gg-wac-modal {
        max-height: 90vh !important;
        border-radius: 12px 12px 0 0 !important;
    }

    .gg-wac-modal-header {
        padding: 20px 20px 12px !important;
    }

    .gg-wac-modal-title {
        font-size: 18px !important;
    }

    .gg-wac-modal-body {
        padding: 16px 20px 20px !important;
    }

    .gg-wac-form-row {
        grid-template-columns: 1fr !important;
    }

    .gg-wac-form-input,
    .gg-wac-form-select,
    .gg-wac-form-textarea,
    .gg-wac-form input,
    .gg-wac-form select,
    .gg-wac-form textarea {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
}

/* =============================================
   PULSE ANIMATION
   ============================================= */

@keyframes gg-wac-pulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(79, 115, 69, 0.4) !important;
    }
    50% {
        box-shadow: 0 4px 24px rgba(79, 115, 69, 0.6) !important;
    }
}

.gg-wac-button:not(:hover),
#gg-wac-button:not(:hover) {
    animation: gg-wac-pulse 2.5s ease-in-out infinite;
}
