/* Shares the look of the Mailchimp form (mc4wp.css) */
:root {
    --cf7-font: inherit;
    --cf7-font-size: 16px;
    --cf7-font-weight: 300;
    --cf7-labels: #5a6e81;
    --cf7-input-text: #5a6e81;
    --cf7-accent: #5a6e81;
    --cf7-accent-hover: #5a6e81;
    --cf7-accent-outline: #0000001c;
    --cf7-warning: #fb584e;
    --cf7-warning-bg: #FFEDEC;
    --cf7-success: #00B474;
    --cf7-success-bg: #E6FFF0;
}

/* ===========================
   Form Wrapper & Layout
=========================== */
.wpcf7 {
    font-family: var(--cf7-font);
    width: 100% !important;
}

.wpcf7-form p {
    font-size: 16px;
    font-style: normal;
    overflow: visible;
    margin-bottom: 1.25rem;
}

.wpcf7 label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--cf7-labels);
    font-size: var(--cf7-font-size);
}

.wpcf7-list-item {
    margin-left: 0 !important;
    margin-right: 15px !important;
}

/* ===========================
   Text Inputs, Textarea & Select
=========================== */
.wpcf7 input[type=color],
.wpcf7 input[type=date],
.wpcf7 input[type=datetime-local],
.wpcf7 input[type=datetime],
.wpcf7 input[type=email],
.wpcf7 input[type=month],
.wpcf7 input[type=number],
.wpcf7 input[type=search],
.wpcf7 input[type=tel],
.wpcf7 input[type=text],
.wpcf7 input[type=time],
.wpcf7 input[type=url],
.wpcf7 input[type=week],
.wpcf7 form textarea, /* beats the parent theme's .wpcf7-form p textarea */
.wpcf7 select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    margin: 0;
    border: 1px solid #D5E0EB;
    border-radius: 6px;
    font-size: var(--cf7-font-size) !important; /* parent theme forces 12px */
    font-weight: var(--cf7-font-weight);
    font-family: var(--cf7-font);
    color: var(--cf7-input-text);
    transition: all 0.2s ease;
    box-sizing: border-box;
    background-color: #fff;
}

.wpcf7 input[type=color],
.wpcf7 input[type=date],
.wpcf7 input[type=datetime-local],
.wpcf7 input[type=datetime],
.wpcf7 input[type=email],
.wpcf7 input[type=month],
.wpcf7 input[type=number],
.wpcf7 input[type=search],
.wpcf7 input[type=tel],
.wpcf7 input[type=text],
.wpcf7 input[type=time],
.wpcf7 input[type=url],
.wpcf7 input[type=week],
.wpcf7 select {
    height: 40px;
    line-height: 1 !important;
}

.wpcf7 select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.wpcf7 input:focus[type=color],
.wpcf7 input:focus[type=date],
.wpcf7 input:focus[type=datetime-local],
.wpcf7 input:focus[type=datetime],
.wpcf7 input:focus[type=email],
.wpcf7 input:focus[type=month],
.wpcf7 input:focus[type=number],
.wpcf7 input:focus[type=search],
.wpcf7 input:focus[type=tel],
.wpcf7 input:focus[type=text],
.wpcf7 input:focus[type=time],
.wpcf7 input:focus[type=url],
.wpcf7 input:focus[type=week],
.wpcf7 textarea:focus,
.wpcf7 select:focus {
    border-color: var(--cf7-accent);
    box-shadow: 0 0 0 3px var(--cf7-accent-outline);
    outline: none;
    background-color: #fff;
}

/* ===========================
   File Input
=========================== */
.wpcf7 input[type=file] {
    color: var(--cf7-input-text);
    font-size: var(--cf7-font-size);
    font-weight: var(--cf7-font-weight);
    font-family: var(--cf7-font);
}

.wpcf7 input:focus[type=file] {
    outline: none;
    border: 0;
}

.wpcf7 input[type=file]::file-selector-button {
    padding: 0.6rem 0.75rem;
    margin-right: 20px;
    border: 1px solid #D5E0EB;
    border-radius: 6px;
    font-size: var(--cf7-font-size);
    font-weight: var(--cf7-font-weight);
    font-family: var(--cf7-font);
    color: var(--cf7-input-text);
    background-color: #fff;
    cursor: pointer;
}

/* ===========================
   Submit Button
   !important values override the parent theme's .wpcf7-submit rules
   and mirror what the Mailchimp button ends up with.
=========================== */
.wpcf7 input.wpcf7-submit[type=submit] {
    display: block;
    width: 30% !important;
    height: 40px;
    padding: 14px 10px !important;
    margin: 20px 0 15px 0 !important;
    background-color: #000;
    color: #ffffff !important;
    font-weight: 700;
    border: none !important;
    border-radius: 0;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 12px !important;
    line-height: 1 !important;
    text-align: center;
    transition: none;
}

.wpcf7 input.wpcf7-submit[type=submit]:hover {
    background-color: var(--e-global-color-primary);
    color: #000 !important;
    filter: none;
    -webkit-filter: none;
}

.wpcf7 input[type=submit]:active {
    transform: scale(0.98);
}

.wpcf7 input[type=submit]:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--cf7-accent-outline);
}

.wpcf7 input.wpcf7-submit:disabled[type=submit],
.wpcf7 input.wpcf7-submit:disabled[type=submit]:hover {
    color: #ffffff !important;
    background-color: var(--cf7-warning);
    cursor: not-allowed;
}

/* ===========================
   Checkboxes & Radios
=========================== */
/* Label + alignment */
.wpcf7-checkbox label,
.wpcf7-acceptance label,
.wpcf7-radio label {
    display: flex;
    align-items: center; /* vertical align checkbox and text */
    gap: 10px;
    cursor: pointer;
    font-weight: var(--cf7-font-weight);
    color: var(--cf7-input-text);
    width: 100%;
}

/* Checkbox itself */
.wpcf7 input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    border: 1px solid var(--cf7-accent);
    border-radius: 2px;
    display: inline-grid; /* inline with label text */
    place-content: center;
    cursor: pointer;
    background-color: #fff;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    vertical-align: middle; /* align with text */
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

/* Checked: the box itself fills, so nothing can sit off-centre */
.wpcf7 input[type="checkbox"]:checked {
    background-color: var(--cf7-accent);
}

/* Dashicon checkmark, sized to the 16px inside the border */
.wpcf7 input[type="checkbox"]::before {
    content: "\f147";
    display: block; /* transform is ignored on inline boxes */
    font-family: 'dashicons';
    font-weight: 400;
    font-size: 16px;
    line-height: 16px;
    width: 16px;
    height: 16px;
    color: #fff;
    text-align: center;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
}

.wpcf7 input[type="checkbox"]:checked::before {
    transform: scale(1);
}

/* Radio */
.wpcf7 input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid var(--cf7-accent);
    border-radius: 100%;
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    background-color: #fff;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    transition: all 0.2s ease-in-out;
}

.wpcf7 input[type="radio"]::before {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 100%;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--cf7-accent);
}

.wpcf7 input[type="radio"]:checked::before {
    transform: scale(1);
}

/* Hover and focus states */
.wpcf7 input[type="checkbox"]:hover,
.wpcf7 input[type="radio"]:hover {
    border-color: var(--cf7-accent-hover);
}

.wpcf7 input[type="checkbox"]:focus,
.wpcf7 input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--cf7-accent-outline);
}

/* ===========================
   Validation & Response Messages
=========================== */
.wpcf7-not-valid-tip {
    color: var(--cf7-warning) !important;
    font-size: var(--cf7-font-size) !important;
    font-weight: var(--cf7-font-weight) !important;
}

.wpcf7-not-valid:not(input[type=file]):not(span) {
    border-color: #FFBAB6 !important;
    background-color: #FFFAFA !important;
}

.wpcf7 form.init .wpcf7-response-output {
    display: none;
}

.wpcf7 form .wpcf7-response-output { /* Default */
    margin: 15px 0 !important;
    padding: 10px 20px !important;
    border: 0 !important;
    border-radius: 6px !important;
}

.wpcf7 form.sent .wpcf7-response-output { /* Success */
    background-color: var(--cf7-success-bg) !important;
    color: var(--cf7-success) !important;
    border: 0 !important;
}

.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output,
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output { /* Failed */
    background-color: var(--cf7-warning-bg) !important;
    color: var(--cf7-warning) !important;
    border: 0 !important;
}

input#author, input#email, input#url {
    background-color: inherit;
}
