/* Global Styles */
html {
    background: #eaf1e7;
}

/* Container styling */
.oeko-form {
    max-width: 70em;
    margin: 2rem auto;
    background: #f8f8f8;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Headings */
.oeko-form h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5em;
    color: #2e2e2e;
}

/* Labels */
.oeko-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

/* Text inputs */
.oeko-form input[type="text"],
.oeko-form input[type="email"],
.oeko-form input[type="password"],
.oeko-form input[type="url"],
.oeko-form textarea {
    width: 100%;
    padding: 0.6rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

/* Buttons */
.oeko-form button,
.acf-form .acf-button {
    background: #6b8e58;
    color: white;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.oeko-form button:hover,
.acf-form .acf-button:hover {
    background: #577647;
}

/* Small hint text */
.oeko-form .hint {
    font-size: 0.9em;
    margin-top: 1rem;
    color: #555;
}

/* Messages */
.login-error,
.login-success {
    background: #fce4e4;
    color: #b00020;
    padding: 0.8rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.login-success {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Readonly fields */
.oeko-readonly input,
.oeko-readonly textarea,
.oeko-readonly select {
    background: #f9f9f9;
    color: #777;
    pointer-events: none;
    border-color: #ddd;
}

/* Wide variant */
.oeko-form.wide {
    max-width: 1000px;
    margin: 0 auto;
}

/* ACF fields container */
.oeko-form .acf-form-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* ACF single field */
.oeko-form .acf-field {
    flex: 1 1 45%;
    min-width: 300px;
}

/* Full width field */
.oeko-form .acf-field.-full {
    flex: 1 1 100%;
}

.success {
    background: #6b8e58;
    color: white;
    padding: 1em;
}

/* Footer margin fix */
footer.wp-block-template-part {
    margin-block-start: 0 !important;
}

/* Image field wrapper */
.oeko-form .acf-field[data-type="image"] {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Image preview styling */
.oeko-form .acf-field[data-type="image"] .acf-image-uploader img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* File input styling */
.oeko-form .acf-field[data-type="image"] .acf-image-uploader input[type="file"] {
    margin-top: 10px;
}

/* Responsive fix */
@media (max-width: 768px) {
    .oeko-form {
        padding: 1rem;
    }

    .oeko-form .acf-form-fields {
        flex-direction: column;
    }

    .oeko-form .acf-field {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .oeko-form h2 {
        font-size: 1.3em;
        text-align: center;
    }

    .oeko-form button,
    .acf-form .acf-button {
        width: 100%;
        text-align: center;
    }

    .oeko-form input[type="text"],
    .oeko-form input[type="email"],
    .oeko-form input[type="password"],
    .oeko-form input[type="url"],
    .oeko-form textarea {
        font-size: 1.2rem !important; /* bigger on small screens */
    }
}
