/* Main Wrapper */
.fcm-contact-wrap {
    width: 100%;
    padding: clamp(40px, 5vw, 60px) clamp(18px, 4vw, 40px);
    font-family: 'Open Sans', sans-serif;
}

.fcm-contact-inner {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    /* Slightly larger right column */
    gap: 60px;
}

/* Typography */
.fcm-contact-headline {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 52px;
    line-height: 1.1;
    margin-bottom: 30px;
    color: #000;
    text-transform: uppercase;
}

.fcm-contact-intro {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 40px;
    color: #000;
}

/* Person Section */
.fcm-contact-person {
    margin-top: 40px;
}

.fcm-cp-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 24px;
    border-bottom: 2px solid #000;
    padding-bottom: 15px;
    margin-bottom: 25px;
    color: #000;
    text-transform: uppercase;
}

.fcm-cp-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
}

.fcm-cp-image {
    width: 88px;
    min-width: 88px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    background: #f3f3f3;
}

.fcm-cp-image img {
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    display: block;
    border-radius: 50%;
    object-fit: cover;
}

.fcm-cp-details {
    font-size: 16px;
    line-height: 1.4;
    color: #000;
}

.fcm-cp-name {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 5px;
    color: #000;
}

.fcm-cp-role {
    margin-bottom: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #000;
}

.fcm-cp-row a {
    color: #000;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fcm-cp-row a:hover {
    color: #faba4b;
}

/* Form Notched / Floating Labels Styling */
.fcm-input-wrapper {
    position: relative;
    margin-top: 15px;
    /* Push down to make room for the floating label */
}

.fcm-input-wrapper .form-label {
    position: absolute;
    top: -12px;
    /* Pull up to sit exactly on the top border. Needs to be half the font-size */
    left: 15px;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 18px;
    /* Maintain original size for labels */
    color: #000 !important;
    background-color: #fff;
    padding: 0 8px;
    margin: 0;
    z-index: 2;
    line-height: 1;
}

.form-control {
    display: block;
    width: 100%;
    padding: 24px 20px 10px 20px !important;
    /* Increased top padding for smaller text and label clearance */
    font-size: 14px !important;
    /* Smaller input text */
    line-height: 1.5;
    color: #000 !important;
    /* Ensure text is completely black */
    background-color: #fff;
    /* Ensure background is solid white */
    background-clip: padding-box;
    border: 1px solid #000;
    border-radius: 4px;
    /* Soft corners mimicking the design */
    appearance: none;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !important;
}

.fcm-contact-form input.form-control {
    min-height: 64px;
    padding: 24px 20px 10px 20px !important;
}

.fcm-contact-form textarea.form-control {
    padding: 24px 20px 14px 20px !important;
}

.form-control:focus {
    color: #000;
    background-color: #fff;
    border-color: #faba4b;
    box-shadow: 0 0 0 1px #faba4b;
    outline: 0;
}

/* Fix Bootstrap's default margin on row to align flush */
.fcm-contact-form .row {
    margin-left: -10px;
    margin-right: -10px;
}

.fcm-contact-form .col-md-6 {
    padding-left: 10px;
    padding-right: 10px;
}

/* Checkbox Alignment & Styling */
.fcm-checkbox-wrapper {
    display: grid !important;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    column-gap: 15px;
    row-gap: 8px;
    margin-top: 25px;
    margin-bottom: 25px;
}

.fcm-checkbox-wrapper .form-check-input {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    margin: 2px 0 0 0 !important;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid #7c7c7c;
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
}

.fcm-checkbox-wrapper .form-check-input:checked,
.fcm-checkbox-wrapper .form-check-input:active,
.fcm-checkbox-wrapper .form-check-input:focus {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    background-color: #000;
    border-color: #000;
}

.fcm-checkbox-wrapper .form-check-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    line-height: 1.4;
    text-transform: none;
}

.fcm-checkbox-wrapper .fcm-check-feedback {
    grid-column: 2;
}

.fcm-checkbox-wrapper .form-check-label a {
    color: #000;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fcm-checkbox-wrapper .form-check-label a:hover {
    color: #faba4b;
}

/* Button (Matches fcm-button 1:1 with specific Overrides) */
/* Using ID + !important to override global button styles (High Specificity) */
.fcm-contact-form .fcm-contact-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 15px !important;

    font-family: 'Oswald', sans-serif !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    font-style: normal !important;
    text-transform: none !important;
    text-decoration: none !important;
    line-height: 1 !important;

    color: var(--Schwarz, #000) !important;
    background: transparent !important;
    background-color: transparent !important;

    border: none !important;
    border-radius: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    border-bottom: 3px solid #000 !important;
    padding: 0 !important;
    padding-bottom: 5px !important;
    padding-right: 0 !important;
    background-image: none !important;

    transition: color 0.2s ease, border-color 0.2s ease !important;
    cursor: pointer !important;
    margin-top: 20px !important;
    float: none !important;
    width: auto !important;
    height: auto !important;
}

.fcm-contact-form .fcm-contact-btn:hover {
    color: #faba4b !important;
    border-bottom-color: #faba4b !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* Inner Elements */
.fcm-contact-form .fcm-contact-btn .fcm-button__icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 0 !important;
}

.fcm-contact-form .fcm-contact-btn .fcm-button__icon svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    transition: stroke 0.2s ease !important;
    stroke: currentColor !important;
}

/* Tablet / Mobile Adjustments */
@media (max-width: 768px) {
    .fcm-contact-btn {
        font-size: 24px !important;
        gap: 10px !important;
    }

    .fcm-contact-btn svg {
        width: 22px !important;
        height: 22px !important;
    }
}

/* Form Feedback */
.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 5px;
    font-size: 16px;
    /* Match standard text size */
    font-family: 'Open Sans', sans-serif;
    color: #d6181f;
}

/* Invalid State for Inputs */
.was-validated .form-control:invalid {
    border-color: #d6181f;
    /* FCM Red */
    padding-right: 40px;
    /* Warning Icon SVG */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d6181f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 25px 25px !important;
    /* Force size to prevent huge blowup */
}

/* Invalid State Textarea specific position */
.was-validated textarea.form-control:invalid {
    background-position: right 15px top 15px !important;
}

/* Invalid State for Checkbox Container */
.was-validated .form-check-input:invalid {
    border-color: #d6181f;
}

/* Turn checkbox label text red on invalid */
.was-validated .form-check-input:invalid~.form-check-label {
    color: #d6181f;
}

.was-validated .form-check-input:invalid~.form-check-label a {
    color: #d6181f;
}

.was-validated .form-control:invalid~.invalid-feedback,
.was-validated .form-check-input:invalid~.invalid-feedback {
    display: block;
    animation: popIn 0.2s ease-out forwards;
}

/* Adjust Checkbox Error Feedback Layout */
.fcm-checkbox-wrapper {
    flex-wrap: wrap;
    /* Allow the error message to drop down if needed */
}

/* Valid States - Override Bootstrap Green completely */
.was-validated .form-control:valid,
.was-validated .form-check-input:valid {
    border-color: #000;
    background-image: none;
    /* Remove default Bootstrap green checkmark */
    padding-right: 20px;
    /* Reset padding to normal */
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translateY(-5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Valid States - Remove green border completely to stick to the design */
.was-validated .form-control:valid,
.was-validated .form-check-input:valid {
    border-color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    .fcm-contact-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .fcm-contact-headline {
        font-size: clamp(36px, 12vw, 46px);
        margin-bottom: 22px;
    }

    .fcm-contact-intro {
        font-size: 16px;
        margin-bottom: 28px;
    }

    .fcm-contact-person {
        margin-top: 28px;
    }

    .fcm-cp-title {
        font-size: 22px;
        padding-bottom: 12px;
        margin-bottom: 20px;
    }

    .fcm-cp-card {
        grid-template-columns: 72px minmax(0, 1fr);
        align-items: start;
        gap: 16px;
    }

    .fcm-cp-image {
        width: 72px;
        min-width: 72px;
    }

    .fcm-cp-details {
        font-size: 15px;
        line-height: 1.55;
    }

    .fcm-cp-name {
        font-size: 17px;
    }

    .fcm-input-wrapper {
        margin-top: 12px;
    }

    .fcm-input-wrapper .form-label {
        left: 12px;
        font-size: 16px;
        padding: 0 6px;
    }

    .form-control {
        font-size: 16px !important;
        padding: 22px 16px 12px 16px !important;
    }

    .fcm-contact-form input.form-control {
        min-height: 58px;
    }

    .fcm-contact-form textarea.form-control {
        min-height: 144px;
        padding: 22px 16px 14px 16px !important;
    }

    .fcm-checkbox-wrapper {
        grid-template-columns: 20px minmax(0, 1fr);
        column-gap: 12px;
        row-gap: 8px;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .fcm-checkbox-wrapper .form-check-input {
        margin-top: 1px !important;
    }

    .fcm-checkbox-wrapper .form-check-label {
        font-size: 13px;
        line-height: 1.5;
    }

    .invalid-feedback {
        font-size: 14px;
    }
}
