/*---------------------------------------------------------------------------------

 Theme Name:   	Divi Child
 Theme URI:  	    
 Description:  	Vrubel Petr's child theme for Divi
 Author:       	Petr Vrubel
 Author URI:   	https://vrubel.online/
 Template:     	Divi
 Version:      	1.1.0
 License:      	GNU General Public License v2 or later
 License URI:  	http://www.gnu.org/licenses/gpl-2.0.html

------------------------------ ADDITIONAL CSS HERE ------------------------------*/

body .mfp-title {display:none}

body.et_secondary_nav_enabled #page-container #top-header {
  background-color: var(--gcid-vzgs7ypqar)!important;;
}

.color-loxone > a {
	color: #68C350!important;
}

.color-loxone > a:hover {
	color: #417932!important;
}

#page-container {
    overflow: visible !important;
}
/* 
   Contact Form 7 - Custom Styles (Minimalist Underline + Floating Labels)
   Matches screen.png design with improved UX
*/

.cf7-contact-form {
    max-width: 800px;
    margin: 40px auto;
    font-family: inherit;
    color: var(--gcid-secondary-color, #2c2e35);
}

.cf7-contact-form__row {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* 6-column grid for max flexibility (halves, thirds) */
    gap: 30px;
    margin-bottom: 40px;
}

.cf7-contact-form__group {
    position: relative;
    grid-column: span 6; /* Default full width */
}

.cf7-contact-form__group--half {
    grid-column: span 3;
}

.cf7-contact-form__group--third {
    grid-column: span 2;
}

.cf7-contact-form__group--two-thirds {
    grid-column: span 4;
}

/* Standalone groups not in a row (including conditional groups) */
.cf7-contact-form .cf7-contact-form__group {
    margin-bottom: 40px;
}

.cf7-contact-form__row .cf7-contact-form__group {
    margin-bottom: 0;
}

/* Floating Label Logic */
.cf7-contact-form__label {
    position: absolute;
    top: 10px;
    left: 0;
    font-size: 16px;
    color: var(--gcid-secondary-color, #2c2e35);
    transition: all 0.3s ease;
    pointer-events: none;
    opacity: 0; /* Hidden initially */
    transform: translateY(10px);
}

.cf7-contact-form__label--static {
    position: static;
    display: block;
    opacity: 1;
    transform: none;
    margin-bottom: 10px;
    font-weight: 500;
}

/* Show label when:
   1. The group contains a focused element
   2. The group contains an input/textarea that is NOT showing its placeholder (meaning it has text)
   3. The group contains a select that has a value selected (not the first empty/placeholder option)
   4. The group contains a date input (these usually have browser-default values/templates)
*/
.cf7-contact-form__group:focus-within .cf7-contact-form__label,
.cf7-contact-form__group:has(.cf7-contact-form__input:not(:placeholder-shown)) .cf7-contact-form__label,
.cf7-contact-form__group:has(.cf7-contact-form__input:not([value=""])) .cf7-contact-form__label,
.cf7-contact-form__group:has(input[type="date"]) .cf7-contact-form__label {
    opacity: 1;
    top: -20px;
    font-size: 13px;
    font-weight: 700;
    transform: translateY(0);
    color: var(--gcid-secondary-color, #2c2e35);
}

/* Specific fix for Select fields in CF7 which might not use placeholders the same way */
.cf7-contact-form__group:has(select option:checked:not([value=""])) .cf7-contact-form__label {
     opacity: 1;
     top: -20px;
     font-size: 13px;
     font-weight: 700;
     transform: translateY(0);
}

.cf7-contact-form__input {
    width: 100% !important;
    padding: 10px 0 !important;
    border: none !important;
    border-bottom: 1px solid var(--gcid-secondary-color, #2c2e35) !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    color: var(--gcid-secondary-color, #2c2e35) !important;
    font-size: 16px !important;
    transition: border-bottom-color 0.3s ease !important;
    box-sizing: border-box !important;
}

.cf7-contact-form__input:focus {
    border-bottom-color: #ffffff !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Styling Placeholder */
.cf7-contact-form__input::placeholder {
    color: rgba(44, 46, 53, 0.6); /* Slightly faded dark grey */
    transition: opacity 0.3s ease;
}

.cf7-contact-form__input:focus::placeholder {
    opacity: 0; /* Hide placeholder on focus to show label clearly */
}

textarea.cf7-contact-form__input {
    min-height: 80px;
    resize: vertical;
}

.cf7-contact-form__heading {
    font-size: 24px;
    font-weight: 700;
    color: var(--gcid-secondary-color, #2c2e35);
    margin: 40px 0 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center; /* Aligned to the center */
    border-bottom: none;
    padding-bottom: 3rem; /* 3rem spacing below the heading */
}

.cf7-contact-form__checkbox-group,
.cf7-contact-form__radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

/* Modern Checkboxes & Radio Buttons */
.cf7-contact-form__checkbox-group .wpcf7-list-item,
.cf7-contact-form__radio-group .wpcf7-list-item {
    margin: 0;
    display: block; /* Force each item to a new line */
    width: 100%;
}

.cf7-contact-form__checkbox-group label,
.cf7-contact-form__radio-group label {
    display: inline-flex; /* Keep label content aligned horizontally */
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px; /* Spacing between lines */
}

.cf7-contact-form__checkbox-group .wpcf7-list-item:last-child label,
.cf7-contact-form__radio-group .wpcf7-list-item:last-child label {
    margin-bottom: 0;
}

.cf7-contact-form__checkbox-group input[type="checkbox"],
.cf7-contact-form__radio-group input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--gcid-secondary-color, #2c2e35);
    background-color: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.cf7-contact-form__radio-group input[type="radio"] {
    border-radius: 50%; /* Circle for radio */
}

.cf7-contact-form__checkbox-group input[type="checkbox"] {
    border-radius: 3px; /* Slightly rounded square for checkboxes */
}

.cf7-contact-form__checkbox-group input[type="checkbox"]:checked,
.cf7-contact-form__radio-group input[type="radio"]:checked {
    border-color: var(--gcid-secondary-color, #2c2e35);
}

.cf7-contact-form__radio-group input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 10px;
    height: 10px;
    background-color: var(--gcid-secondary-color, #2c2e35);
    border-radius: 50%;
}

.cf7-contact-form__checkbox-group input[type="checkbox"]:checked {
    background-color: var(--gcid-secondary-color, #2c2e35);
}

.cf7-contact-form__checkbox-group input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 11px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.cf7-contact-form__info-box {
    background-color: rgba(255, 255, 255, 0.15);
    border-left: 4px solid #ffffff;
    padding: 20px;
    margin: 10px 0 40px; /* Pushed lower to avoid overlap with floating labels/underlines */
    font-size: 15px;
    color: var(--gcid-secondary-color, #2c2e35);
    line-height: 1.5;
}

.cf7-contact-form__info-box a {
    color: var(--gcid-b9l6dpsxzj, #171717) !important; /* Dark link for readability on yellow/transparency */
    text-decoration: underline;
    font-weight: 700;
}

.cf7-contact-form__info-box a:hover {
    opacity: 0.8;
}

.cf7-contact-form__submit-wrapper {
    display: flex;
    justify-content: flex-start;
    flex-direction: row-reverse;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    position: relative;
}

.cf7-contact-form__submit {
    background-color: var(--gcid-efgk0c9iy6, #434343) !important;
    color: #ffffff !important;
    border: 3px solid var(--gcid-efgk0c9iy6, #434343) !important;
    border-radius: 0 !important;
    padding: 5.6px 35.2px !important;
    font-family: "Montserrat", sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.cf7-contact-form__submit:hover {
    background-color: var(--gcid-b9l6dpsxzj, #171717) !important;
    color: #ffffff !important;
    border-color: var(--gcid-b9l6dpsxzj, #171717) !important;
    padding-right: 55px !important; /* Make room for the icon */
}

/* Position icon absolutely inside the right edge of the wrapper (which perfectly overlaps the right-aligned button) */
.cf7-contact-form__submit-wrapper::after {
    content: 'E';
    font-family: 'ETmodules' !important;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    color: #ffffff !important;
    transition: all 0.3s ease !important;
    pointer-events: none;
}

/* Trigger the icon only when the button itself is hovered using :has() */
.cf7-contact-form__submit-wrapper:has(.cf7-contact-form__submit:hover)::after {
    opacity: 1;
    right: 15px;
}

/* Specific adjustment for radio group spacing and validation */
.cf7-contact-form__group--checkbox,
.cf7-contact-form__group--radio {
    padding-bottom: 1.5rem;
}

.cf7-contact-form__checkbox-group .wpcf7-not-valid-tip,
.cf7-contact-form__radio-group .wpcf7-not-valid-tip {
    position: static !important;
    display: block;
    margin-top: 10px;
    bottom: initial !important;
}

/* CF7 Validation Messages */
.wpcf7-not-valid-tip {
    color: #f00 !important;
    font-size: 12px !important;
    font-weight: bold;
    position: absolute;
    bottom: -35px;
}

/* CF7 Global Form Response Output (High contrast for yellow background) */
.wpcf7 form .wpcf7-response-output {
    background-color: var(--gcid-b9l6dpsxzj, #171717) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px;
    padding: 15px 20px !important;
    font-size: 16px;
    font-weight: 500;
    margin-top: 30px !important;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Success state indicator */
.wpcf7 form.sent .wpcf7-response-output {
    border-left: 5px solid #4CAF50 !important; /* Green */
}

/* Error/Failed state indicator */
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output {
    border-left: 5px solid #f00 !important; /* Red */
}


@media (max-width: 768px) {
    .cf7-contact-form__row {
        grid-template-columns: 1fr;
        gap: 40px; /* Consistent vertical spacing for stacked fields */
    }
    
    .cf7-contact-form__group--half,
    .cf7-contact-form__group--third,
    .cf7-contact-form__group--two-thirds {
        grid-column: span 1;
    }
    
    .cf7-contact-form__submit-wrapper {
        justify-content: center;
    }
    
    .cf7-contact-form__submit {
        flex-grow: 1;
        width: auto !important;
    }
}