:root {
    --fwc-bg: #ffffff;
    --fwc-fg: #111111;
    --fwc-muted: #6b7280;
    --fwc-border: #e5e7eb;
    --fwc-overlay-bg: rgba(0, 0, 0, 0.8);
    --fwc-shadow: rgba(0, 0, 0, 0.15);
    --fwc-radius: 10px; /* Slightly smaller radius */
}

/* Floating WhatsApp button */
.wa-fab {
    position: fixed;
    right: 10px;
    bottom: 8px;
    width: 45px; /* Slightly smaller button */
    height: 45px;
    border-radius: 50%;
    background: var(--fwc-fg);
    color: var(--fwc-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--fwc-border);
    box-shadow: 0 8px 15px var(--fwc-shadow);
    cursor: pointer;
    transition: transform 0.2s ease;
    animation: pulse 2s ease-in-out infinite;
    z-index: 1000;
}
.wa-fab:hover { transform: translateY(-1px); }
.wa-fab:focus-visible {
    outline: 2px solid var(--fwc-fg);
    outline-offset: 3px;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}
.wa-icon {
    width: 24px; /* Slightly smaller icon */
    height: 24px;
    display: block;
}

/* Overlay + Dialog */
.fwc-overlay {
    position: fixed;
    inset: 0;
    background: var(--fwc-overlay-bg);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px; /* Reduced padding */
    z-index: 1001;
}
.fwc-overlay[aria-hidden="false"] { display: flex; }

.fwc-dialog {
    width: 100%;
    max-width: 380px; /* Reduced max-width */
    background: var(--fwc-bg);
    color: var(--fwc-fg);
    border-radius: var(--fwc-radius);
    border: 1px solid var(--fwc-border);
    box-shadow: 0 20px 40px var(--fwc-shadow);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.fwc-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px; /* Further reduced padding */
    border-bottom: 1px solid var(--fwc-border);
    flex-shrink: 0;
}
.fwc-dialog-title {
    font-size: 14px; /* Further reduced font size */
    font-weight: 600;
    margin: 0;
}
.fwc-close-btn {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--fwc-muted);
    padding: 5px; /* Reduced padding */
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px; /* Further reduced font size */
    line-height: 1;
}
.fwc-close-btn:hover { color: var(--fwc-fg); }

.fwc-dialog-body {
    padding: 10px 14px; /* Further reduced padding */
    overflow-y: auto;
    flex-grow: 1;
}

/* Form Styling with increased specificity to prevent conflicts */
.fwc-dialog .fwc-field {
    margin-bottom: 8px; /* Further reduced margin */
}
.fwc-dialog .fwc-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px; /* Further reduced margin */
}
.fwc-dialog .fwc-input, 
.fwc-dialog .fwc-textarea, 
.fwc-dialog .fwc-select {
    width: 100%;
    padding: 7px 9px; /* Unified padding */
    background: #ffffff;
    color: var(--fwc-fg);
    border: 1px solid var(--fwc-border);
    border-radius: 6px; /* Unified radius */
    font-size: 13px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    font-family: inherit; /* Inherit font from body */
}
.fwc-dialog .fwc-input:focus, 
.fwc-dialog .fwc-textarea:focus, 
.fwc-dialog .fwc-select:focus {
    outline: none;
    border-color: #d1d5db;
    box-shadow: 0 0 0 3px #f3f4f6;
}
.fwc-dialog .fwc-textarea {
    resize: vertical;
    min-height: 70px;
}

/* Custom select styling */
.fwc-dialog .fwc-select-wrap {
    position: relative;
}
.fwc-dialog .fwc-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #ffffff;
    padding-right: 35px;
}

/* ===== START OF CHANGED CODE ===== */
.fwc-dialog .fwc-select-wrap::after {
    content: '';
    position: absolute;
    pointer-events: none;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    /* Simple black chevron SVG icon */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23111111'%3e%3cpath d='M8 11.207l-5.604-5.604 1.414-1.414L8 8.379l4.19-4.19 1.414 1.414L8 11.207z'/%3e%3c/svg%3e");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
}
/* ===== END OF CHANGED CODE ===== */

.fwc-dialog .fwc-error {
    margin-top: 4px;
    font-size: 11px;
    color: #b91c1c;
}
.fwc-dialog .fwc-helper {
    font-size: 11px;
    color: var(--fwc-muted);
    margin-top: 4px;
}

.fwc-dialog .fwc-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.fwc-dialog .fwc-btn {
    appearance: none;
    border: 1px solid var(--fwc-border);
    background: var(--fwc-fg);
    color: var(--fwc-bg);
    padding: 7px 11px;
    font-size: 12px;
    border-radius: 8px; /* Adjusted to match input fields better */
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
    font-family: inherit;
}
.fwc-dialog .fwc-btn:hover { 
    opacity: 0.95; 
    transform: translateY(-1px); 
}
.fwc-dialog .fwc-btn.fwc-secondary {
    background: #f9fafb;
    color: var(--fwc-fg);
}
.fwc-dialog .fwc-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .fwc-dialog {
        max-height: 95vh;
    }
    .wa-fab {
        width: 40px;
        height: 40px;
    }
    .wa-icon {
        width: 22px;
        height: 22px;
    }
}