*, *::before, *::after {
    box-sizing: border-box;
}

.createFormContainer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin: clamp(20px, 4vw, 50px);
    text-align: left;
    max-width: 100%;
    width: auto;
    box-sizing: border-box;
}

.createFormContainer .questions {
    display: flex;
    flex-direction: column;
    margin-inline: 0;
    min-width: 0;
    width: 100%;
}

.createFormContainer .questions label {
    width: 100%;
    margin-block: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    display: flex;
    gap: 6px;
    overflow-wrap: anywhere;
}

.createFormContainer .questions input, 
.createFormContainer .questions select, 
.createFormContainer .questions textarea {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #7C7C7C;
    font-size: 16px;
    color: #D6482C;
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
}

.createFormContainer .questions input:focus, 
.createFormContainer .questions select:focus, 
.createFormContainer .questions textarea:focus {
    border-color: #D6482C;
    outline: none;
}

.createFormContainer textarea {
    min-height: 120px;
    resize: vertical;
}

.createFormContainer .termsCheckBox {
    display: flex;
    flex-direction: row;
    column-gap: 12px;
    align-items: flex-start;
    margin-block: 15px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.createFormContainer .termsCheckBox input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #D6482C;
    cursor: pointer;
    flex-shrink: 0;
}

.createFormContainer .filesContainer {
    min-width: 0;
    width: 100%;
}

.createFormContainer .files {
    border-radius: 15px;
    border: 1px solid #7C7C7C;
    height: 100%;
    min-height: 250px;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    background-color: #fafafa;
}

.createFormContainer .files input[type="file"] {
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px dashed #7C7C7C;
    border-radius: 8px;
    cursor: pointer;
    background-color: #fff;
    width: 100%;
}

.uploaded-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
}

.image-preview {
    display: flex;
    flex-direction: row;
    column-gap: 15px;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.image-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}


/* ================= RESPONSIVE MEDIA QUERIES ================= */

@media screen and (max-width: 900px) {
    .createFormContainer {
        grid-template-columns: 1fr;
        margin: clamp(16px, 3vw, 30px);
        gap: 25px;
    }

    .createFormContainer .files {
        min-height: auto;
    }
}

@media screen and (max-width: 600px) {
    .createFormContainer {
    margin: 15px 12px;
    padding: 30px 0;
}

    .image-preview {
        margin: 5px 0;
        column-gap: 10px;
        padding: 8px;
    }

    .image-preview img {
        width: 65px;
        height: 65px;
    }
}

/* ------------------------------------------------------------------
   Responsive additions: phones / small tablets.
   This file is linked from auction/form.blade.php so it is applied after
   the inline @push('style') block - the rules below are the effective
   ones for the create-auction form on small screens.
   ------------------------------------------------------------------ */
@media screen and (max-width: 900px) {
    /* Two columns collapse to one column (see rule above) - make sure the
       upload box can grow with the wrapped previews. */
    .createFormContainer .files {
        height: auto;
    }
}

@media screen and (max-width: 767.98px) {
    .createFormContainer {
        padding-inline: 4px;
    }

    .createFormContainer .files {
        padding: 14px;
    }

    .createFormContainer .files input[type="file"] {
        padding: 8px;
        font-size: 13px;
    }

    /* Thumb friendly submit. */
    .createFormContainer .questions button[type="submit"] {
        min-height: 48px;
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    /* Stack each preview (image on top, file name below) so nothing is
       squeezed on 320-480px wide phones. */
    .image-preview {
        flex-direction: column;
        align-items: flex-start;
        row-gap: 6px;
    }

    .image-preview img {
        width: 100%;
        max-width: 200px;
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .createFormContainer textarea {
        min-height: 100px;
    }
}