/* SendGrid Newsletter – Popup, Footer, Listing forms */

/* Popup */
.maloney-newsletter-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
/* Backdrop: subtle overlay so the website remains visible */
.maloney-newsletter-popup-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
}
.maloney-newsletter-popup-box {
    position: relative;
    display: flex;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    max-width: 720px;
    width: 100%;
    min-height: 380px;
    overflow: hidden;
}
/* Left panel: sign-up icons (border-radius top-left, bottom-left only) */
.maloney-newsletter-popup-panel.maloney-newsletter-popup-image {
    flex: 0 0 40%;
    min-width: 0;
    position: relative;
    border-radius: 16px 0 0 16px;
}
.maloney-newsletter-popup-image-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: initial, 100% 100%;
    background-repeat: repeat, no-repeat;
    background-position: center, 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* With hero image: dark bottom overlay (icons pop), light tint, decoration, hero; icons sit lower */
.maloney-newsletter-popup-image-inner.maloney-newsletter-popup-image-inner-with-hero {
    background-size: 100% 100%, 100% 100%, initial, cover;
    background-repeat: no-repeat, no-repeat, repeat, no-repeat;
    background-position: 0 0, 0 0, center, center;
    align-items: flex-end;
    padding-bottom: 1.5rem;
}
.maloney-newsletter-popup-icons {
    max-width: 75%;
    max-height: 55%;
    width: auto;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 1;
}
.maloney-newsletter-popup-image-inner-with-hero .maloney-newsletter-popup-icons {
    max-height: 42%;
}
/* Right panel: content; border-radius top-right, bottom-right only (no, yes, no, yes) */
.maloney-newsletter-popup-panel.maloney-newsletter-popup-content {
    flex: 1;
    padding: 32px 28px 28px;
    border-radius: 0 16px 0 16px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    box-sizing: border-box;
    position: relative; /* so close button is positioned at top-right of this panel (visible on mobile) */
}
.maloney-newsletter-popup-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #1d1d1f;
    padding: 4px;
    z-index: 10;
    /* Touch-friendly hit area (min 44px for mobile) */
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.maloney-newsletter-popup-close:hover {
    color: #000;
    opacity: 0.8;
}
/* Mobile: no image panel, form only; compact spacing */
@media (max-width: 640px) {
    .maloney-newsletter-popup {
        padding: 12px;
    }
    .maloney-newsletter-popup-box {
        flex-direction: column;
        max-width: 340px;
        min-height: 0;
    }
    /* Hide image/icon panel on mobile */
    .maloney-newsletter-popup-panel.maloney-newsletter-popup-image {
        display: none;
    }
    .maloney-newsletter-popup-panel.maloney-newsletter-popup-content {
        padding: 16px 14px 14px;
    }
    .maloney-newsletter-popup-title {
        margin: 0 0 2px 0;
        font-size: 1.2rem;
    }
    .maloney-newsletter-popup-desc {
        margin: 0;
        font-size: 0.875rem;
    }
    .maloney-newsletter-popup-form .maloney-newsletter-fields-row {
        gap: 8px;
        margin-bottom: 0;
    }
    .maloney-newsletter-popup-form .maloney-newsletter-fields-row .maloney-newsletter-field {
        margin-bottom: 6px;
    }
    .maloney-newsletter-popup-form .maloney-newsletter-fields-row .maloney-newsletter-field label {
        margin-bottom: 1px;
    }
    .maloney-newsletter-popup-form input[type="email"],
    .maloney-newsletter-popup-form input[type="text"],
    .maloney-newsletter-popup-form input[type="tel"] {
        padding: 8px 12px;
        font-size: 0.9375rem;
    }
    .maloney-newsletter-popup-form .maloney-newsletter-checkboxes {
        margin: 6px 0 6px;
        gap: 6px;
    }
    .maloney-newsletter-popup-form .maloney-newsletter-recaptcha {
        margin: 6px 0;
    }
    .maloney-newsletter-popup-form .maloney-newsletter-message {
        margin: 6px 0;
    }
    .maloney-newsletter-popup-form .maloney-newsletter-submit {
        padding: 10px 20px;
        font-size: 0.9375rem;
    }
    .maloney-newsletter-popup-close {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.08);
        color: #1d1d1f;
        border-radius: 50%;
    }
    .maloney-newsletter-popup-close:hover,
    .maloney-newsletter-popup-close:focus {
        background: rgba(0, 0, 0, 0.12);
    }
}
.maloney-newsletter-popup-title {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.02em;
    line-height: 1.25;
    text-align: left;
}
.maloney-newsletter-popup-desc {
    margin: 0 0 20px 0;
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.5;
}
/* Popup form: two fields per row */
.maloney-newsletter-popup-form .maloney-newsletter-fields-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}
.maloney-newsletter-popup-form .maloney-newsletter-fields-row .maloney-newsletter-field {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}
/* Popup form inputs: same style as .maloney-newsletter-form (email, text, tel) */
.maloney-newsletter-popup-form input[type="email"],
.maloney-newsletter-popup-form input[type="text"],
.maloney-newsletter-popup-form input[type="tel"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
    background: #fff;
    color: #1d1d1f;
}
.maloney-newsletter-popup-form input::placeholder {
    color: #9ca3af;
}
.maloney-newsletter-popup-form input:focus {
    border-color: #2563eb;
    outline: none;
}
.maloney-newsletter-popup-form .maloney-newsletter-checkboxes {
    margin: 14px 0 16px;
}
.maloney-newsletter-popup-form .maloney-newsletter-submit {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    background: #2f7b9b;
    color: #fff;
    border: none;
    cursor: pointer;
    align-self: flex-start;
}
.maloney-newsletter-popup-form .maloney-newsletter-submit:hover {
    background: #266a87;
}
.maloney-newsletter-popup-form .maloney-newsletter-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Footer: title+description left, form right; background decoration3 + gradient */
.maloney-newsletter-footer {
    background-image: url(/wp-content/uploads/2021/05/decoration3.png), linear-gradient(180deg, #2f7b9b 0%, #d3e7ea 100%) !important;
    background-size: initial;
    background-repeat: repeat;
    color: #fff;
    padding: 32px 24px;
}
.maloney-newsletter-footer-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.maloney-newsletter-footer-left {
    flex: 0 1 320px;
    min-width: 0;
}
.maloney-newsletter-footer-right {
    flex: 1;
    min-width: 280px;
}
.maloney-newsletter-footer-title {
    margin: 0 0 12px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    text-align: left;
}
.maloney-newsletter-footer-desc {
    margin: 0;
    font-size: 1rem;
    color: #fff;
    line-height: 1.5;
    opacity: 0.95;
}
.maloney-newsletter-footer-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}
.maloney-newsletter-footer-row .maloney-newsletter-field {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}
.maloney-newsletter-footer-form .maloney-newsletter-field {
    margin-bottom: 0;
}
.maloney-newsletter-footer-form input[type="email"],
.maloney-newsletter-footer-form input[type="text"],
#maloney-newsletter-footer input[type="tel"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    font-size: 1rem;
    box-sizing: border-box;
    background: #fff;
    color: #333;
}
.maloney-newsletter-footer-form input::placeholder {
    color: #888;
}
.maloney-newsletter-footer-form .maloney-newsletter-checkboxes {
    margin: 12px 0 14px;
}
/* Submit button – vibrant blue to match older newsletter */
.maloney-newsletter-footer-form .maloney-newsletter-submit {
    cursor: pointer;
    white-space: nowrap;
    align-self: stretch;
    color: #FFFFFF !important;
    background-color: #2f7b9b !important;
    padding: 16px 32px !important;
    border-radius: 40px;
    border: none !important;
    font-size: 20px;
    font-weight: bold;
}
.maloney-newsletter-footer-form .maloney-newsletter-submit:hover {
    background: #2868e6;
}
/* Checkbox labels in footer – white/light text */
.maloney-newsletter-footer-form .maloney-newsletter-checkboxes label {
    color: #fff;
}
.maloney-newsletter-footer-form .maloney-newsletter-message.success {
    color: #6ee7b7;
}
.maloney-newsletter-footer-form .maloney-newsletter-message.error {
    color: #fca5a5;
}

/* Footer – Ulta-style (same look as listing block): solid blue background, one row, white inputs/button */
.maloney-newsletter-footer-ulta {
    background: rgba(47, 123, 155, 1) !important;
    background-image: none !important;
    padding: 28px 24px;
    border-radius: 4px;
}
.maloney-newsletter-footer-ulta .maloney-newsletter-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 32px;
    align-items: center;
    flex-wrap: wrap;
}
.maloney-newsletter-footer-ulta .maloney-newsletter-footer-left {
    flex: 0 1 35%;
    min-width: 0;
}
.maloney-newsletter-footer-ulta .maloney-newsletter-footer-right {
    flex: 1;
    min-width: 280px;
}
.maloney-newsletter-footer-ulta .maloney-newsletter-footer-title {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.maloney-newsletter-footer-ulta .maloney-newsletter-footer-desc {
    margin: 0;
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.45;
}
.maloney-newsletter-footer-ulta .maloney-newsletter-footer-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
    flex-wrap: wrap;
    margin-bottom: 0;
}
.maloney-newsletter-footer-ulta .maloney-newsletter-footer-row .maloney-newsletter-field {
    flex: 1;
    min-width: 100px;
}
.maloney-newsletter-footer-ulta .maloney-newsletter-footer-form input[type="email"],
.maloney-newsletter-footer-ulta .maloney-newsletter-footer-form input[type="text"],
.maloney-newsletter-footer-ulta .maloney-newsletter-footer-form input[type="tel"],
#maloney-newsletter-footer.maloney-newsletter-footer-ulta input[type="tel"] {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #fff;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff;
}
.maloney-newsletter-footer-ulta .maloney-newsletter-footer-form input::placeholder {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
}
.maloney-newsletter-footer-ulta .maloney-newsletter-footer-form input:focus,
#maloney-newsletter-footer.maloney-newsletter-footer-ulta input[type="tel"]:focus {
    outline: none;
    border-color: #fff;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.28) !important;
}
.maloney-newsletter-footer-ulta .maloney-newsletter-footer-form .maloney-newsletter-submit {
    height: 44px;
    padding: 0 24px;
    border: 1px solid #fff;
    border-radius: 4px;
    background: #fff !important;
    background-color: #fff !important;
    color: rgba(47, 123, 155, 1) !important;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.maloney-newsletter-footer-ulta .maloney-newsletter-footer-form .maloney-newsletter-submit:hover {
    background: #f8f8f8 !important;
    background-color: #f8f8f8 !important;
}
.maloney-newsletter-footer-ulta .maloney-newsletter-footer-form .maloney-newsletter-checkboxes label {
    color: #fff;
}
@media (max-width: 768px) {
    .maloney-newsletter-footer-ulta .maloney-newsletter-footer-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .maloney-newsletter-footer-ulta .maloney-newsletter-footer-row {
        flex-direction: column;
    }
    .maloney-newsletter-footer-ulta .maloney-newsletter-footer-row .maloney-newsletter-field {
        min-width: 0;
    }
}

/* Listing page form (under pictures) – default / shortcode */
.maloney-newsletter-listing-form {
    margin: 32px 0;
    padding: 24px;
    background: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}
.maloney-newsletter-listing-form h3 {
    margin: 0 0 16px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

/* Listing page form – Ulta-style (single listing only): title+desc left, form right, one row of inputs + button */
.maloney-newsletter-listing-form-ulta {
    margin: 32px 0;
    padding: 28px 24px;
    background: rgba(232, 105, 98, 1);
    border-radius: 4px;
    border: none;
}
.maloney-newsletter-listing-form-ulta .maloney-newsletter-listing-form-inner {
    display: flex;
    gap: 32px;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto;
}
.maloney-newsletter-listing-form-ulta .maloney-newsletter-listing-form-left {
    flex: 0 1 35%;
    min-width: 0;
}
.maloney-newsletter-listing-form-ulta .maloney-newsletter-listing-form-right {
    flex: 1;
    min-width: 280px;
}
.maloney-newsletter-listing-form-ulta .maloney-newsletter-listing-form-title {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.maloney-newsletter-listing-form-ulta .maloney-newsletter-listing-form-desc {
    margin: 0;
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.45;
}
.maloney-newsletter-listing-form-ulta .maloney-newsletter-listing-form-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
    flex-wrap: wrap;
}
.maloney-newsletter-listing-form-ulta .maloney-newsletter-listing-form-row .maloney-newsletter-field {
    flex: 1;
    min-width: 100px;
    margin-bottom: 0;
}
.maloney-newsletter-listing-form-ulta .maloney-newsletter-listing-form-row input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #fff;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}
.maloney-newsletter-listing-form-ulta .maloney-newsletter-listing-form-row input::placeholder {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
}
.maloney-newsletter-listing-form-ulta .maloney-newsletter-listing-form-row input:focus {
    outline: none;
    border-color: #fff;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.28);
}
.maloney-newsletter-listing-form-ulta .maloney-newsletter-listing-form-form .maloney-newsletter-submit {
    height: 44px;
    padding: 0 24px;
    border: 1px solid #fff;
    border-radius: 4px;
    background: #fff;
    color: rgba(232, 105, 98, 1);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.maloney-newsletter-listing-form-ulta .maloney-newsletter-listing-form-form .maloney-newsletter-submit:hover {
    background: #f8f8f8;
}
.maloney-newsletter-listing-form-ulta .maloney-newsletter-checkboxes {
    margin: 12px 0 0;
    gap: 16px;
}
.maloney-newsletter-listing-form-ulta .maloney-newsletter-checkboxes label {
    color: #fff;
}
/* Response messages on individual property newsletter block: white for contrast on coral background */
.maloney-newsletter-listing-form-ulta .maloney-newsletter-message.success,
.maloney-newsletter-listing-form-ulta .maloney-newsletter-message.error {
    color: #fff !important;
}
@media (max-width: 768px) {
    .maloney-newsletter-listing-form-ulta .maloney-newsletter-listing-form-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .maloney-newsletter-listing-form-ulta .maloney-newsletter-listing-form-row {
        flex-direction: column;
    }
    .maloney-newsletter-listing-form-ulta .maloney-newsletter-listing-form-row .maloney-newsletter-field {
        min-width: 0;
    }
}

/* Shared form elements */
.maloney-newsletter-form .maloney-newsletter-field {
    margin-bottom: 14px;
}
.maloney-newsletter-form .maloney-newsletter-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.9rem;
}
.maloney-newsletter-form input[type="email"],
.maloney-newsletter-form input[type="text"] {
    width: 100%;
    max-width: 360px;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 0;
    font-size: 1rem;
    box-sizing: border-box;
}
.maloney-newsletter-form input:focus {
    border-color: #2563eb;
    outline: none;
}
.maloney-newsletter-checkboxes {
    margin: 16px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.maloney-newsletter-checkboxes label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}
.maloney-newsletter-checkboxes input {
    width: auto;
}
.maloney-newsletter-recaptcha {
    margin: 12px 0;
    min-height: 78px;
}
.maloney-newsletter-message {
    margin: 12px 0;
    font-size: 0.95rem;
    min-height: 1.4em;
}
.maloney-newsletter-message:empty {
    margin: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}
.maloney-newsletter-message.success {
    color: #059669;
}
.maloney-newsletter-message.error {
    color: #dc2626;
}
.maloney-newsletter-submit {
    padding: 10px 20px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}
.maloney-newsletter-submit:hover {
    background: #1d4ed8;
}
.maloney-newsletter-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .maloney-newsletter-footer-inner {
        flex-direction: column;
    }
    .maloney-newsletter-footer-row {
        flex-direction: column;
    }
}

/* Space above Receive Alerts card when it's inside the similar properties sidebar */
.similar-properties-sidebar:has(.maloney-newsletter-similar-card) {
    padding-top: 24px !important;
}

/* Receive Alerts card (above Similar Properties) */
.maloney-newsletter-similar-card {
    margin-top: 0;
    margin-bottom: 0;
    padding: 36px 20px 24px 20px !important; /* Extra top padding so there's clear space above the icon */
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
    box-sizing: border-box;
}
.maloney-newsletter-similar-card-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    padding-top: 0; /* Avoid any collapse with card padding */
    color: rgba(47, 123, 155, 1);
}
.maloney-newsletter-similar-card-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}
.maloney-newsletter-similar-card-title {
    margin: 0 0 6px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(47, 123, 155, 1);
    line-height: 1.3;
}
.maloney-newsletter-similar-card-desc {
    margin: 0 0 18px 0;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}
.maloney-newsletter-similar-card .maloney-newsletter-anchor-btn {
    display: block;
    width: 100%;
    margin: 0;
    text-align: center;
    box-sizing: border-box;
    background: rgba(232, 105, 98, 1) !important;
    border-color: rgba(232, 105, 98, 1);
    box-shadow: 0 2px 8px rgba(232, 105, 98, 0.25);
}
.maloney-newsletter-similar-card .maloney-newsletter-anchor-btn:hover {
    background: #fff !important;
    color: rgba(232, 105, 98, 1) !important;
    border-color: rgba(232, 105, 98, 1);
    box-shadow: 0 4px 12px rgba(232, 105, 98, 0.35);
}
.maloney-newsletter-similar-card .maloney-newsletter-anchor-btn:focus {
    outline-color: rgba(232, 105, 98, 0.6);
}

/* Newsletter anchor button (inside card or standalone) */
.maloney-newsletter-anchor-btn {
    display: inline-block;
    margin-bottom: 16px;
    padding: 12px 20px;
    background: rgba(47, 123, 155, 1);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    border: 2px solid rgba(47, 123, 155, 1);
    box-shadow: 0 2px 8px rgba(47, 123, 155, 0.25);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.maloney-newsletter-anchor-btn:hover {
    background: #fff;
    color: rgba(47, 123, 155, 1) !important;
    box-shadow: 0 4px 12px rgba(47, 123, 155, 0.35);
    transform: translateY(-1px);
}
.maloney-newsletter-anchor-btn:focus {
    outline: 2px solid rgba(47, 123, 155, 0.6);
    outline-offset: 2px;
}
.similar-properties-sidebar .maloney-newsletter-anchor-btn,
.similar-properties .maloney-newsletter-anchor-btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}
