/* Basic form styling */
#oem-contact-form, #general-contact-form {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: transparent; /* Tło całego formularza na przeźroczyste */
    width: 100%; /* Make it 100% of parent up to max-width */
    max-width: 900px; /* Zwiększona szerokość formularza z 800px na 900px */
    margin: 30px auto; /* Keeps it centered */
    padding: 20px;
    border: none; /* No border for the form container */
    border-radius: 8px;
    box-shadow: none; /* No shadow for the form container */
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 18px;
}

.form-group {
    flex: 1 1 calc(50% - 10px);
    min-width: 190px; /* Adjusted to allow two columns down to ~400px before wrapping naturally */
    box-sizing: border-box;
}

/* Specific styling for the single-column elements (like RODO, full-width textareas) */
.form-group.full-width {
    flex: 1 1 100%;
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px; /* Zmniejszony padding */
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 16px;
    background-color: #fff; /* Tło pól na białe */
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="file"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.25);
}

.form-group textarea {
    resize: vertical;
    min-height: 70px; /* Zmniejszona min-height */
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
}

/* NEW: Checkbox grid for "Jakie produkty OEM Cię interesują?" */
.product-checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Adjust gap between checkboxes */
    margin-top: 5px;
}

.product-checkbox-grid > div {
    flex: 1 1 calc(50% - 10px); /* Two columns for checkboxes */
    box-sizing: border-box;
    min-width: 150px; /* Allow checkboxes to wrap if too narrow */
}

.product-checkbox-grid label {
    display: flex; /* Align checkbox and text horizontally */
    align-items: center;
    font-weight: normal; /* Checkbox labels typically not bold */
    margin-bottom: 0; /* Remove default label margin */
}

/* Styling for the submit button */
.form-group button[type="submit"] {
    background-color: #325928;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 0; /* No border-radius for the button */
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: auto;
    text-transform: uppercase;
}

.form-group button[type="submit"]:hover {
    background-color: #2a4c21;
}

/* NEW: Centering the submit button */
.form-submit-row {
    text-align: center; /* Center content of this div */
    margin-top: 20px; /* Space above button */
}


/* Specific styling for the 'Other products' and 'Other industry' section */
.dynamic-input-container {
    padding: 15px;
    border: 1px dashed #ccc;
    border-radius: 5px;
    background-color: #fff; /* ZMIANA: Tło na białe */
    margin-top: 10px;
}

.dynamic-input-container label {
    font-style: italic;
    color: #555;
}

/* RODO consent styling */
.rodo-consent {
    background-color: #fff; /* ZMIANA: Tło na białe */
    border: 1px solid #cceeff;
    padding: 15px;
    border-radius: 5px;
    margin-top: 25px;
}

.rodo-consent label {
    display: flex;
    align-items: flex-start;
    font-size: 15px;
    font-weight: normal;
}

.rodo-consent input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.rodo-consent p {
    margin: 0;
    margin-left: 8px;
}

.rodo-consent a {
    color: black; /* ZMIANA: Kolor linku na czarny */
    text-decoration: none;
    font-weight: bold; /* ZMIANA: Pogrubienie linku */
}

.rodo-consent a:hover {
    text-decoration: underline;
}

/* Thank you page styling - applies to both */
.thank-you-page {
    display: none;
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    text-align: center;
    border: 1px solid #d4edda;
    border-radius: 8px;
    background-color: #d4edda;
    color: #155724;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.thank-you-page h2 {
    color: #155724;
    margin-bottom: 15px;
}

.thank-you-page p {
    font-size: 18px;
    margin-bottom: 10px;
}

.thank-you-page a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.thank-you-page a:hover {
    text-decoration: underline;
}

/* Mobile responsiveness - breakpoint at 500px */
@media (max-width: 500px) {
    .form-group {
        flex: 1 1 100%;
        min-width: unset;
        margin-bottom: 18px;
    }

    .form-row {
        gap: 0;
        margin-bottom: 0;
        flex-direction: column;
    }

    .form-group.full-width {
        margin-bottom: 18px;
    }

    #oem-contact-form, #general-contact-form {
        padding: 15px;
    }

    /* Checkboxes also stack on mobile */
    .product-checkbox-grid > div {
        flex: 1 1 100%;
    }
}