/* ==================================================
   MODAL
================================================== */

.modal-overlay {
    position: fixed;

    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 30px;

    background: rgba(0, 0, 0, 0.55);

    z-index: 300;
}


/* THIS IS WHAT MAKES THE MODAL APPEAR */

.modal-overlay.open {
    display: flex;
}


.project-modal {
    width: 100%;
    max-width: 650px;

    max-height: 85vh;

    overflow-y: auto;

    padding: 30px;

    border: 2px solid #171717;

    background: #f2efe7;
}


/* ==================================================
   MODAL HEADER
================================================== */

.modal-header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    margin-bottom: 30px;

    padding-bottom: 20px;

    border-bottom: 1px solid #171717;
}

.modal-header h2 {
    margin: 5px 0 0;

    font-size: 28px;
}

.modal-label {
    margin: 0;

    font-size: 11px;

    letter-spacing: 2px;
}

.modal-close {
    padding: 0;

    border: none;

    background: transparent;

    font-size: 28px;

    cursor: pointer;
}


/* ==================================================
   FORM
================================================== */

#projectForm {
    display: flex;

    flex-direction: column;

    gap: 20px;
}

#projectForm label {
    display: flex;

    flex-direction: column;

    gap: 8px;

    font-size: 11px;
    font-weight: bold;

    letter-spacing: 1px;
}

#projectForm input,
#projectForm select,
#projectForm textarea {
    width: 100%;

    padding: 12px;

    border: 1px solid #171717;

    outline: none;

    background: transparent;
    color: #171717;

    font-size: 13px;
}

#projectForm textarea {
    resize: vertical;
}

#projectForm input:focus,
#projectForm select:focus,
#projectForm textarea:focus {
    outline: 2px solid #171717;

    outline-offset: 2px;
}

.character-counter {
    align-self: flex-end;

    font-size: 10px;
    font-weight: normal;

    letter-spacing: 0;

    opacity: 0.6;
}


/* ==================================================
   FORM LAYOUT
================================================== */

.form-row {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 15px;
}

.form-section {
    padding-top: 20px;

    border-top: 1px solid #171717;
}

.form-section-title {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 12px;

    font-size: 11px;
    font-weight: bold;

    letter-spacing: 1px;
}

.form-section-title button {
    padding: 0;

    border: none;

    background: transparent;

    font-size: 11px;
    font-weight: bold;

    cursor: pointer;
}

.form-section-title button:hover {
    text-decoration: underline;
}

.mini-row {
    display: grid;

    grid-template-columns: 2fr 1fr;

    gap: 10px;

    margin-bottom: 10px;
}


/* ==================================================
   SUBMIT
================================================== */

.submit-project {
    margin-top: 10px;

    padding: 17px;

    border: 2px solid #171717;

    background: #171717;
    color: #f2efe7;

    font-weight: bold;

    letter-spacing: 1px;

    cursor: pointer;
}

.submit-project:hover {
    background: transparent;
    color: #171717;
}


/* ==================================================
   MOBILE
================================================== */

@media (max-width: 600px) {

    .modal-overlay {
        padding: 15px;
    }

    .project-modal {
        max-height: 90vh;

        padding: 20px;
    }

    .form-row,
    .mini-row {
        grid-template-columns: 1fr;
    }

}