/* Popup Form Styles */
/* Overlay */
.efh-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998;
}
/* Form Container */
.efh-popup-form-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    padding: 20px;
}
/* Close Button */
.efh-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
}
.efh-popup-close:hover {
    color: #333;
}
/* Form Content */
.efh-popup-form-content {
    position: relative;
    padding: 5px;
}
.efh-popup-form-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.8em;
}
.efh-product-name {
    margin-bottom: 16px;
}
/* Form Rows */
.efh-form-row {
    margin-bottom: 15px;
    width: 100%;
}
.efh-form-row label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #516b5c;
}
.efh-form-row input[type="text"],
.efh-form-row input[type="email"],
.efh-form-row input[type="tel"],
.efh-form-row textarea,
.efh-select-field {
    width: 100%;
    padding: 10px;
    background-color: #ffffff;
    border: 1px solid #516b5c !important;
    border-radius: 8px !important;
    font-size: 16px;
}
.efh-form-row textarea {
    resize: vertical;
    min-height: 100px;
}
/* Flexible row layouts */
.efh-form-row.efh-row-name-contact,
.efh-form-row.efh-row-address-fields,
.efh-form-row.efh-row-postal-fields {
    display: flex;
    justify-content: space-between;
}
.efh-form-row-half {
    width: 48%;
    display: inline-block;
}
.efh-form-row-half:first-of-type {
    margin-right: 3%;
}
/* Checkbox styling */
.efh-checkbox-label {
    display: flex;
    align-items: flex-start;
    font-weight: normal;
}
.efh-checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
}
/* Submit Button */
.efh-form-submit {
    margin-top: 20px;
    text-align: center;
    width: 100%;
}
.efh-submit-button {
    width: 100%;
    padding: 12px 25px;
    background-color: #516b5c;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}
.efh-submit-button:hover {
    background-color: #455a4e;
}
/* Form Message */
.efh-form-message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    display: none;
}
.efh-form-message.success {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}
.efh-form-message.error {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}
/* "Kontakta oss" Button */
.efh-contact-button {
    background-color: #184969 !important;
    color: white;
    padding: 10px 20px !important;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.efh-contact-button:hover {
    background-color: #902b19 !important;
}
/* Category selection dropdown */
.efh-select-field {
    cursor: pointer;
}
.efh-select-field:focus {
    outline: none;
    border-color: var(--e-global-color-astglobalcolor3);
}
.efh-field-description {
    margin-top: 5px;
	margin-bottom:0px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}
/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    
	.efh-form-row {
		margin-bottom: 10px;
	}
	
	/* Selectively reset flex layouts */
    .efh-form-row.efh-row-name-contact,
    .efh-form-row.efh-row-address-fields {
        display: block;
    }
    
    /* Keep postal fields on same line */
    .efh-form-row.efh-row-postal-fields {
        display: flex;
        justify-content: space-between;
    }
    
    /* Adjust form rows */
    .efh-form-row-half,
    .efh-form-row.efh-row-name-contact .efh-form-row-half,
    .efh-form-row.efh-row-address-fields .efh-form-row-half {
        width: 100%;
        display: block;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    /* Exception for postal fields to remain inline */
    .efh-form-row.efh-row-postal-fields .efh-form-row-half {
        width: 48%;
        display: inline-block;
        margin-bottom: 0;
    }
    .efh-form-row.efh-row-postal-fields .efh-form-row-half:first-of-type {
        margin-right: 3%;
    }
    
    /* Adjust form container for mobile */
    .efh-popup-form-container {
        width: 96%;
        max-width: 400px;
        max-height: 90vh;
        padding: 16px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        box-sizing: border-box;
    }
    
    /* Reduce heading size */
    .efh-popup-form-content h2 {
        font-size: 1.3em !important;
        margin-bottom: 0px !important;
    }
    
    /* Adjust close button for mobile */
    .efh-popup-close {
        top: 5px;
        right: 10px;
        font-size: 20px;
    }
    
    /* Reduce font sizes for better mobile experience */
    .efh-form-row label {
        font-size: 11px;
    }
    
    .efh-form-row input[type="text"],
    .efh-form-row input[type="email"],
    .efh-form-row input[type="tel"],
    .efh-form-row textarea,
    .efh-select-field {
        font-size: 14px;
        padding: 8px;
    }
    
    /* Adjust submit button */
    .efh-submit-button {
        font-size: 13px;
        padding: 10px 20px;
    }
}