/* Modal shell */
.dw-cf7-modal[hidden] { display: none !important; }

.dw-cf7-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
}

.dw-cf7-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.55);
}

.dw-cf7-modal__dialog {
	position: relative;
	margin: 6vh auto;
	width: min(720px, calc(100% - 32px)); /* "medium" overall modal width */
	max-height: 88vh;
	overflow: auto;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 10px 40px rgba(0,0,0,.25);
	padding: 18px;
	outline: none;
}

.dw-cf7-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(0,0,0,.08);
	margin-bottom: 14px;
}

.dw-cf7-modal__title {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.2;
}

.dw-cf7-modal__close {
	appearance: none;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	padding: 6px 10px;
	border-radius: 10px;
}

.dw-cf7-modal__close:focus {
	outline: 2px solid rgba(0,0,0,.35);
	outline-offset: 2px;
}

/* Prevent body scroll when open */
body.dw-modal-open {
	overflow: hidden;
}

/* CF7 medium styling */
#dw-cf7-modal .wpcf7 {
	margin: 0;
}

#dw-cf7-modal .wpcf7 form {
	margin: 0;
}

#dw-cf7-modal .wpcf7 p {
	margin: 0 0 14px;
}

/* Inputs: comfortable medium sizing */
#dw-cf7-modal .wpcf7 input[type="text"],
#dw-cf7-modal .wpcf7 input[type="email"],
#dw-cf7-modal .wpcf7 input[type="tel"],
#dw-cf7-modal .wpcf7 textarea,
#dw-cf7-modal .wpcf7 select {
	width: 100%;
	max-width: 560px;              /* medium field width */
	padding: 12px 12px;
	border-radius: 10px;
	border: 1px solid rgba(0,0,0,.18);
	font-size: 16px;               /* helps iOS avoid zoom */
	line-height: 1.25;
}

#dw-cf7-modal .wpcf7 textarea {
	min-height: 140px;
	resize: vertical;
}

#dw-cf7-modal .wpcf7 label {
	display: block;
	font-size: 0.95rem;
	line-height: 1.2;
}

/* Submit button: medium */
#dw-cf7-modal .wpcf7 input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 18px;
	border-radius: 999px;
	border: 0;
	cursor: pointer;
}

/* Make Turnstile not break layout */
#dw-cf7-modal .wpcf7-turnstile {
	margin-bottom: 14px;
}

/* Center the modal trigger button */
[data-dw-cf7-modal-open]{
    display:block;
    margin:40px auto;
    border-radius:0 !important;   /* square edges */
    text-align:center;
    padding:14px 24px;
    font-size:18px;
    cursor:pointer;
}

.wp-block-button__link[data-dw-cf7-modal-open]{
    border-radius:0 !important;
    display:block;
    margin:40px auto;
}

/* ---------- Fullscreen + scroll behavior ---------- */
.dw-cf7-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
}

.dw-cf7-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.55);
}

/* Desktop defaults */
.dw-cf7-modal__dialog {
	position: relative;
	margin: 6vh auto;
	width: min(720px, calc(100% - 32px));
	max-height: 88vh;
	overflow: hidden;               /* IMPORTANT: body will scroll, not dialog */
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 10px 40px rgba(0,0,0,.25);
	padding: 0;                     /* header/body manage padding */
	outline: none;
	display: flex;
	flex-direction: column;
}

/* Sticky header so the X stays visible */
.dw-cf7-modal__header {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	background: #fff;
	border-bottom: 1px solid rgba(0,0,0,.08);
}

/* Scrollable content area */
.dw-cf7-modal__body {
	padding: 16px;
	overflow: auto;
	-webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
}

/* Mobile: true fullscreen */
@media (max-width: 782px) {
	.dw-cf7-modal__dialog {
		margin: 0;
		width: 100%;
		height: 100%;
		max-height: 100%;
		border-radius: 0;
	}

	.dw-cf7-modal__body {
		/* leave space for sticky header automatically */
		padding: 16px;
	}
}

/* ---------- Buttons & link colors (force black, no blue) ---------- */

/* Trigger button on the page */
[data-dw-cf7-modal-open]{
	display: inline-block;
	margin: 24px auto;
	border-radius: 0 !important;
	background: #000;
	color: #fff;
	text-decoration: none;
	padding: 14px 24px;
	font-size: 18px;
	cursor: pointer;
	border: 0;
}

/* Center align trigger button */
.dw-cf7-modal-trigger-wrap {
	text-align: center;
}

/* If shortcode outputs a <button> inside block button styles */
.wp-block-button__link[data-dw-cf7-modal-open]{
	border-radius: 0 !important;
	background: #000;
	color: #fff;
}

/* Close X: NOT blue */
.dw-cf7-modal__close{
	color: #000 !important;
	background: transparent;
	border: 0;
	border-radius: 0;
	text-decoration: none;
}

/* Remove blue link style in modal (CF7 sometimes outputs links/messages) */
#dw-cf7-modal a,
#dw-cf7-modal a:visited{
	color: #000;
}

/* CF7 submit: black + square */
#dw-cf7-modal .wpcf7 input[type="submit"]{
	background: #000;
	color: #fff;
	border-radius: 0 !important;
}

/* Spinner */
.wpcf7-spinner{
    display:none;
}

/* ===== Newsletter Signup ===== */

.wp-block-contact-form-7-contact-form-selector{
    display:flex;
    justify-content:center;
    width:100%;
}

/* form container */
.wp-block-contact-form-7-contact-form-selector form{
    display:flex;
    justify-content:center;
    width:100%;
}

/* row containing input + button */
.wp-block-contact-form-7-contact-form-selector form p{
    display:flex;
    align-items:center;
    gap:12px;

    width:100%;
    max-width:420px;

    margin:0 auto;
    padding-left:30px; /* aligns with text above */
}

/* remove CF7 line breaks */
.wp-block-contact-form-7-contact-form-selector br{
    display:none;
}

/* email field */
.wp-block-contact-form-7-contact-form-selector input[type="email"]{
    flex:1;
    height:46px;
    padding:0 14px;
    border:0;
    border-radius:0;
    background:#e6e6e6;
}

/* submit button */
.wp-block-contact-form-7-contact-form-selector input[type="submit"]{
    height:46px;
    padding:0 22px;
    background:#000;
    color:#fff;
    border:0;
    border-radius:0;
}

/* mobile */
@media (max-width:640px){

    .wp-block-contact-form-7-contact-form-selector form p{
        flex-direction:column;
        padding-left:0;
        max-width:320px;
    }

    .wp-block-contact-form-7-contact-form-selector input[type="submit"]{
        width:100%;
        border: #fff solid 1px;
    }

}