@import "https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;700&display=swap";

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 20px;
}

#overlay .modal {
    background-color: #fff;
    /* border-radius: 20px; */
    max-width: 490px;
    width: 100%;
    padding: 50px;
    box-shadow: 0 10px 12px #c5cbf9;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

#overlay .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#overlay .modal-header h2 {
    font-size: 28px;
    font-weight: 700;
}

#overlay .close-button {
    position: relative;
    top: -25px;
    font-size: 24px;
    cursor: pointer;
}

#overlay .form-group {
    display: flex;
    align-items: center;
    flex-direction: row;
    /* display: block; */
    /* margin: 16px 0; */
    margin: 1em 0em;
}

#overlay .form-group label {
    /* font-size: 16px;
    color: #0f1730;
    font-weight: 500; */
    width: 20%;
    font-size: 16px;
    color: black;
    font-weight: 500;
}

#overlay .radio-group {
    display: flex;
    margin: 20px 0;
}

#overlay .radio-group input[type="radio"] {
    accent-color: #555b6d;
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin-right: 5px;
}

#overlay .radio-group label {
    margin-right: 16px;
    font-size: 16px;
    color: #555b6d;
}

#overlay input[type="text"],
#overlay input[type="number"],
#overlay textarea {
    /* cursor: default; */
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    width: 20em;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #cfd4e2;
    border-radius: 5px;
    margin: 5px auto;
    outline: none;
}

#overlay textarea {
    resize: vertical;
    height: 93px;
}

#overlay .button-group {
    display: flex;
    justify-content: space-around;
    margin: 30px;
}

#overlay .cancel-button,
#overlay .add-button {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 500;
    font-size: 16px;
    background: none;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    padding: 12px 30px;
}

#overlay .cancel-button {
    color: #0f1730;
}

#overlay .add-button {
    background-color: orange;
    color: black;
}

#overlay .error-message {
    color: #ff4d4f;
    font-size: 14px;
    margin-top: 5px;
}

#overlay .success-message {
    color: #28a745;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: center;
}

#overlay .cancel-button:hover {
    color: #ff4d4f;
}

#overlay .close-button:hover {
    color: #ff4d4f;
}

#overlay .add-button:hover {
    /* background-color: #01f92b; */
    background-color: green;
    color: white;
}

#overlay .cancel-button:hover {
    background-color: red;
    color: white;
    /* background-color: #333; */
}


#overlay .tags-container {
    width: 20em;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid #cfd4e2;
    border-radius: 5px;
    font-family: "IBM Plex Sans", sans-serif;
    padding: 10px;
    margin: 5px auto;
}

#overlay .tag-badge {
    background-color: #e6e6e6;
    /* لون خلفية خفيف */
    color: #333;
    /* لون النص */
    padding: 5px 10px;
    /* تنسيق داخلي */
    border-radius: 15px;
    /* زوايا دائرية */
    font-size: 14px;
    /* حجم الخط */
    font-weight: 500;
    /* وزن النص */
    white-space: nowrap;
    /* منع التفاف النص داخل الـ tag */
}

#overlay .no-tags {
    font-size: 14px;
    color: #888;
    margin-top: 5px;
}

@media (max-width: 720px) {
    body {
        height: auto;
    }

    #overlay {
        width: 90%;
        margin: 50px auto;
    }
}

@media (max-width: 460px) {

    #overlay input[type="text"],
    #overlay input[type="number"],
    #overlay textarea {
        width: 15em;
    }

    #overlay .form-group label {
        width: 100%;
        text-align: center;
    }

    #overlay .modal {
        padding: 2%;
    }

    #overlay .form-group {
        display: flex;
        /* align-items: center; */
        flex-direction: column;
        /* display: block; */
        /* margin: 16px 0; */
        /* margin: 1em 0em; */
    }

    #overlay .radio-group {
        flex-direction: column;
        gap: 15px;
    }

    #overlay .button-group {
        flex-direction: column-reverse;
        gap: 15px;
    }
}