        #custom-chatbox-container *,
        .chatbox-container * {
            box-sizing: border-box;
            font-family: 'Be Vietnam Pro', sans-serif;
        }

        .demo-content {
            text-align: center;
            color: #000;
            margin-top: 100px;
        }

        /* Floating Help Button */
        .help-button {
            position: fixed;
            bottom: 24px;
            right: 24px;
            width: auto;
            height: 36px;
            border: none;
            font-size: 20px;
            cursor: pointer;
            box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3);
            z-index: 1000;
            transition: all 0.3s ease;
            animation: bounce 2s infinite;
            display: flex;
            -webkit-box-align: center;
            align-items: center;
            border-radius: 30px 8px 30px 30px;
            background-color: rgb(42, 78, 138);
            box-shadow: none;
            color: rgb(255, 255, 255);
            cursor: pointer;
            padding: 8px;
            transition: 0.1s ease-out;
            font-family: 'Be Vietnam Pro', sans-serif;
        }
        .help-button span {
            font-size: 0.875rem;
            font-weight: 600;
            float: left;
            user-select: none;
            margin: 0px 8px 2px 8px;
            white-space: nowrap;
            transition: 0.2s ease-in-out;
        }

        .help-button:hover {
            transform: scale(1.1);
            box-shadow: 0 12px 40px rgba(139, 92, 246, 0.4);
        }

        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
            40% { transform: translateY(-10px); }
            60% { transform: translateY(-5px); }
        }

        /* Modal Overlay */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1001;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

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

        /* Modal Container */
        .modal-container {
            position: fixed;
            bottom: 90px;
            right: 24px;
            width: 380px;
            max-width: calc(100vw - 48px);
            background: white;
            border-radius: 16px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
            z-index: 1002;
            transform: translateY(20px) scale(0.95);
            display: none;
            transition: all 0.3s ease;
            max-height: 80vh;
            overflow: hidden;
        }

        .modal-container.active {
            transform: translateY(0) scale(1);
            display: block;
        }

        /* Modal Header */
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 10px 5px;
            border-bottom: 1px solid #e5e7eb;
        }
        input::placeholder, textarea::placeholder  {
            color: #000;
        }

        .modal-title {
            font-size: 18px;
            font-weight: 600;
            color: #1f2937;
            font-family: 'Be Vietnam Pro', sans-serif;
        }

        .close-button {
            background: none;
            border: none;
            font-size: 24px;
            color: #6b7280;
            cursor: pointer;
            padding: 4px;
            border-radius: 4px;
            transition: all 0.2s ease;
        }

        .close-button:hover {
            background: #f3f4f6;
            color: #374151;
        }

        /* Modal Content */
        .modal-content {
            height: 450px;
            overflow-y: auto;
            padding: 0 20px 20px;
            scrollbar-width: thin;
            scrollbar-color: #d1d5db #f9fafb;
            position: relative; /* needed for loader overlay */
        }

        .modal-content::-webkit-scrollbar {
            width: 6px;
        }

        .modal-content::-webkit-scrollbar-track {
            background: #f9fafb;
        }

        .modal-content::-webkit-scrollbar-thumb {
            background: #d1d5db;
            border-radius: 3px;
        }

        /* ── Loader ────────────────────────────────────────────────────────── */

        .chatbox-loader {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.85);
            z-index: 10;
        }

        .chatbox-spinner {
            width: 36px;
            height: 36px;
            border: 3px solid #e5e7eb;
            border-top-color: rgb(42, 78, 138);
            border-radius: 50%;
            animation: chatbox-spin 0.7s linear infinite;
        }

        @keyframes chatbox-spin {
            to { transform: rotate(360deg); }
        }

        /* ── Child email field rows ─────────────────────────────────────────── */
        /*
         * Each child-email field inside CF7 is wrapped by CF7 in a <p> tag.
         * We use .chatbox-field-row on that <p> (or the nearest wrapper)
         * to show/hide the entire row including its label.
         *
         * JS targets the closest('.chatbox-field-row') from the input.
         * In CF7, fields are wrapped in <p> by default — add class
         * "chatbox-field-row" to those <p> tags via the CF7 form editor
         * using the `class` attribute on the tag, e.g.:
         *   [text child_email class:chatbox-field-row placeholder "Child Email"]
         *
         * The <p> wrapper CF7 generates will carry the class.
         * JS hides/shows at the <p> level.
         */
        .chatbox-field-row {
            display: block; /* default; JS sets display:none to hide */
        }

        /* Contact Button */
        .contact-button {
            width: 100%;
            padding: 12px;
            background: linear-gradient(135deg, #8b5cf6, #a855f7);
            color: white;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .contact-button:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
        }

        /* Contact Form */
        .contact-form {
            display: block;
        }

        .form-group {
            margin-bottom: 16px;
        }

        .form-label {
            display: block;
            font-weight: 600;
            color: #374151;
            margin-bottom: 6px;
        }

        .form-input,
        .form-textarea {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 14px;
            transition: border-color 0.2s ease;
        }

        .form-input:focus,
        .form-textarea:focus {
            outline: none;
            border-color: #8b5cf6;
        }

        .form-textarea {
            resize: vertical;
            min-height: 80px;
        }

        /* No Results */
        .no-results {
            text-align: center;
            padding: 32px 16px;
            color: #6b7280;
        }

        /* Success Message */
        .success-message {
            display: none;
            text-align: center;
            padding: 32px 16px;
        }

        .success-message.active {
            display: block;
        }

        .success-icon {
            width: 64px;
            height: 64px;
            background: #10b981;
            border-radius: 50%;
            margin: 0 auto 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 24px;
        }

        h2.form-title {
            font-size: 1rem;
            font-weight: 700;
            margin: 0px 0px 20px;
            -webkit-font-smoothing: antialiased;
            color: rgb(18, 52, 71);
            word-break: break-word;
            overflow-wrap: break-word;
        }
        .contact-form-wrap label {
            font-size: 0.75rem;
            -webkit-font-smoothing: antialiased;
            color: rgb(18, 52, 71);
            word-break: break-word;
            overflow-wrap: break-word;
        }
        .contact-form-wrap input {
            padding: .4rem;
            margin: 0px;
            border-radius: 4px;
            display: block;
            border: 1px solid rgb(207, 215, 223);
            width: 100%;
            box-shadow: rgba(18, 52, 77, 0.05) 0px 1px 2px 0px inset;
            font-size: 0.875rem;
            font-weight: 600;
            height: 35px;
            line-height: 15px;
            font-size: 12px;
            font-family: 'Be Vietnam Pro', sans-serif;
        }

        /* Readonly field styling — subtle visual indicator */
        .contact-form-wrap input[readonly] {
            background-color: #f3f4f6;
            color: #6b7280;
            cursor: default;
        }

        .contact-form-wrap select[disabled] {
            background-color: #f3f4f6;
            color: #6b7280;
            cursor: default;
            opacity: 1; /* prevent browser dimming */
        }

        .contact-form-wrap select.wpcf7-form-control {
            padding: .4em .5em;
            margin: 10px 0px 10px;
            border-radius: 4px;
            display: block;
            border: 1px solid rgb(207, 215, 223);
            width: 100%;
            box-shadow: rgba(18, 52, 77, 0.05) 0px 1px 2px 0px inset;
            font-size: 0.875rem;
            font-weight: 600;
            background-color: transparent;
            text-align: left;
            cursor: pointer;
            height: 35px;
            font-size: 12px;
            font-family: 'Be Vietnam Pro', sans-serif;
        }
        .contact-form-wrap p {
            margin: 10px 0;
        }

        .contact-form-wrap textarea {
            padding: .4em .5em;
            margin: 0;
            border-radius: 4px;
            box-sizing: border-box;
            border: 1px solid rgb(207, 215, 223);
            resize: none;
            overflow: auto;
            box-shadow: rgba(18, 52, 77, 0.05) 0px 1px 2px 0px inset;
            width: 100%;
            outline: none;
            font-size: 0.875rem;
            font-weight: 600;
            font-size: 12px;
            font-family: 'Be Vietnam Pro', sans-serif;
        }
        input.wpcf7-form-control.wpcf7-file {
            margin-top: 3px;
        }
        .required-wrap {
            color: rgb(215, 45, 48);
            font-size: 0.75rem;
        }
        .contact-form-wrap input.wpcf7-form-control.wpcf7-submit.has-spinner {
            border-radius: 8px;
            padding: 0 18px;
            box-shadow: rgba(0, 0, 0, 0.3) 0px 2px 4px 0px;
            background: rgb(42, 78, 138);
            color: rgb(255, 255, 255);
            cursor: pointer;
            font-size: 0.875rem;
            font-weight: 600;
            border: 1px solid rgba(0, 0, 0, 0.125);
            transition: 0.2s ease-in-out;
            width: 100%;
            min-width: 140px;
            margin-right: 0px;
            outline: none;
            margin-bottom: 5px;
            margin-top: 20px;
            font-family: 'Be Vietnam Pro', sans-serif;
        }
        .wpcf7-not-valid-tip,
        .wpcf7-response-output {
            margin: 0 !important;
            font-size: 12px !important;
            margin-top: 0px !important;
        }
        .cf7-success-message {
            text-align: center;
            padding: 30px;
            margin-top: 20px;
            background: #f4fdf6;
            border: 1px solid #28a745;
            border-radius: 10px;
        }
        .cf7-success-message h3 {
            color: #28a745;
            margin-bottom: 10px;
        }

        /* Responsive */
        @media (max-width: 640px) {
            .modal-container {
                width: calc(100vw - 24px);
                right: 12px;
                bottom: 80px;
            }
        }
