/* ==========================================================================
   Newsletter Form Styles
   ========================================================================== */

/* Base Form Container */
.newsletter-form {
    border-radius: 0 !important;
}

.newsletter-form .mail-signup-form .hidden {
    display: none;
}

/* Screen Reader Only */
.newsletter-form .mail-signup-form .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    -webkit-clip-path: inset(50%) !important;
    clip-path: inset(50%) !important;
}

/* Typography & Colors */
.newsletter-form .mail-signup-form .error {
    color: red;
}

body.photo .darkness .content .newsletter-form .mail-signup-form h4,
.newsletter-form .mail-signup-form h4 {
    margin-top: 20px;
    color: #303634;
}

.data-capture .newsletter-form .mail-signup-form h4 {
    margin-top: 30px; /* Inline form override */
}

/* ==========================================================================
   Email Input Group
   ========================================================================== */

.newsletter-form .mail-signup-form .email-form-group {
    position: relative;
}

.data-capture .newsletter-form form input[type="email"],
.newsletter-form .mail-signup-form .email-form-group input[type="email"] {
    float: none;
    width: calc(100% - 1px);
    padding-right: 100px;
    border-radius: 6px;
}

.data-capture .newsletter-form .mail-signup-form input[type="email"] {
    padding-top: 0;
}

/* Primary Submit Button (Icon) */
.newsletter-form .mail-signup-form .email-form-group button {
    position: absolute;
    top: 0;
    right: 0;
    display: block;
    width: 80px;
    height: 60px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    text-indent: -99999px;
    font-size: 18px;
    color: #fff;
    background-color: var(--button-color, #155177);
    background-image: url("https://www.wildernessscotland.com/wp-content/themes/wilderness2018/images/icon-next-white.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
    border: none;
    border-radius: 0 6px 6px 0;
    outline: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: background-color 0.5s;
    -webkit-transition: background-color 0.5s;
}

.newsletter-form .mail-signup-form .email-form-group button:hover,
.newsletter-form .mail-signup-form .email-form-group button:focus,
.newsletter-form .mail-signup-form .email-form-group button:active {
    background-color: var(--button-color, #155177);
}

.data-capture .newsletter-form .mail-signup-form .email-form-group button {
    height: 70px; /* Blog/shortcode override */
}

/* Secondary Submit Button (Standalone) */
.newsletter-form .mail-signup-form input[type="submit"] {
    position: static;
    float: none;
    display: block;
    width: auto;
    height: auto;
    margin: 0 auto 5px auto;
    padding: 16px 52px;
    border-radius: 10px;
}

/* ==========================================================================
   Form Extras (Hidden fields section)
   ========================================================================== */

.form-extras {
    display: block;
    max-height: 0;
    overflow: hidden;
    text-align: center;
    background: #F0ECEE;
    border-radius: 6px;
    opacity: 0;
    transition: max-height 0.2s ease, opacity 0.4s ease 0.2s;
}

.form-extras.vis {
    max-height: 1000px;
    margin: 20px 0 40px 0;
    padding: 20px;
    opacity: 1;
}

.form-extras.vis .gcaptcha-placeholder {
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding-bottom: 30px;
}

/* Name Inputs */
.data-capture .newsletter-form form input[type="text"],
.newsletter-form .mail-signup-form .form-extras input[type="text"] {
    float: left;
    width: 50%;
    background-color: #fff;
}

.data-capture .newsletter-form .mail-signup-form .form-extras input[type="text"] {
    padding-top: 0; /* Blog/shortcode override */
}

.newsletter-form .mail-signup-form .form-extras input.mail-signup-first_name {
    border-right: 1px solid #f1f1f1;
    border-radius: 6px 0 0 6px;
}

.newsletter-form .mail-signup-form .form-extras input.mail-signup-last_name {
    border-left: 1px solid #f1f1f1;
    border-radius: 0 6px 6px 0;
}

/* Interests & Country Interests (Merged logic) */
.newsletter-form .mail-signup-form .form-extras .interest,
.newsletter-form .mail-signup-form .form-extras .country-interest {
    margin: 20px 0 10px 0;
}

.data-capture .newsletter-form .mail-signup-form .form-extras .interest,
.data-capture .newsletter-form .mail-signup-form .form-extras .country-interest {
    margin: 30px 0 10px 0; /* Inline form override */
}

.newsletter-form .mail-signup-form .form-extras .interest label,
.newsletter-form .mail-signup-form .form-extras .country-interest label {
    display: inline-block;
    margin: 0 13px 17px 0;
    font-size: 16px;
    line-height: 1.2;
    color: #262626;
}

.data-capture .newsletter-form .mail-signup-form .form-extras .interest label,
.data-capture .newsletter-form .mail-signup-form .form-extras .country-interest label {
    margin: 0 15px 27px 15px; /* Inline form override */
}

.newsletter-form .mail-signup-form .form-extras .interest label > input,
.newsletter-form .mail-signup-form .form-extras .country-interest label > input {
    position: relative;
    margin-right: 5px;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */

/* Narrow/Desktop Overrides */
@media (min-width: 1240px) {
    .narrow .data-capture .col {
        float: none;
        height: auto;
        padding: 0 20px;
    }

    .narrow .data-capture .col.span-1-2 {
        width: 100%;
    }

    .narrow .data-capture .col.mail-icon {
        padding: 80px 20px 0 20px;
        background-position: 50% 0;
        text-align: center;
    }

    .narrow .data-capture .col.mail-icon .text-con p {
        margin-bottom: 20px;
    }
}

/* Tablet Overrides */
@media screen and (max-width: 740px) {
    .newsletter-form .mail-signup-form .email-form-group button {
        width: 70px;
        height: 50px;
    }
}

/* Mobile Overrides */
@media (max-width: 480px) {
    .narrow .data-capture .col {
        padding: 0 20px;
    }

    .narrow .featured-signup {
        padding: 20px 0;
    }

    .newsletter-form .mail-signup-form .form-extras input.mail-signup-first_name,
    .newsletter-form .mail-signup-form .form-extras input.mail-signup-last_name {
        width: 100%;
        border-right: none;
        border-left: none;
        border-radius: 6px;
    }

    .newsletter-form .mail-signup-form .form-extras input.mail-signup-first_name {
        margin-bottom: 10px;
    }

    .newsletter-form .mail-signup-form .email-form-group button {
        width: 60px;
        height: 40px;
    }
}

/* Small Mobile Overrides */
@media screen and (max-width: 375px) {
    .newsletter-form .mail-signup-form .form-extras .interest label,
    .newsletter-form .mail-signup-form .form-extras .country-interest label {
        display: block;
    }
}