/* *{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Gilroy';
}

html, body {
  height: 100%;
  width: 100%;
}

.main{
    height: 100%;
    width: 100%;
    background-color: rgb(239, 249, 253);
    padding: 5vw 25vw;
}

.container {
    min-height: 17vw;
    width: 50vw;
    background-color: white;
    padding: 2vw;
    border-radius: 1vw;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease-in-out;
}

.container:hover {
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.3);
} */

/* .container h3 {
    font-size: 2vw;
    text-align: center;
    margin-bottom: 1vw;
    letter-spacing: 1px;
}

.form-control{
    display: flex;
    justify-content: center;

}

#grocery{
    padding: 0.5vw;
    font-size: 1.5vw;
    background-color: rgb(239, 249, 253);
    flex: 1;
    border: 1px solid grey;
    margin-bottom: 1vw;
    border-top-left-radius: 1vw;
    border-bottom-left-radius: 1vw; 
}

#grocery:focus {
    outline: none;
    border: 3px solid rgb(148, 216, 239) ;
}

.submit-btn {
    background-color: rgb(148, 216, 239);
    min-width: 100px;
    color: black;
    border: 1px solid grey;
    border-top-right-radius: 1vw;
    border-bottom-right-radius: 1vw;
    padding: 0.5vw;
    font-size: 1.2vw;
    cursor: pointer;
    margin-bottom: 1vw;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.submit-btn:hover {
    background-color: rgb(96, 200, 235);
    color: white;
  }

.grocery-container{
    margin-top: 1rem;
    visibility: hidden;
    min-height: 10vh;
}

.show-container {
    visibility: visible;
}

.grocery-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1vw;
    padding: 0.25vw 1vw;
    text-transform: capitalize;
    border-radius: 1vw;
    font-size: 1.5vw;
}

.alert{
    margin-bottom: 1rem;
    height: 1.5vw;
    display: grid;
    align-items: center;
    text-align: center;
    font-size: 1vw;
    border-radius: 0.25rem;
    letter-spacing: 5px;
    text-transform: capitalize;
}

.alert-fail {
    color: rgb(92, 22, 22);
    background: lightcoral;
}

.alert-success {
    color: rgb(22, 99, 22);
    background: lightgreen;
}

.clear-btn {
    text-transform: capitalize;
    height: 2vw;
    display: grid;
    align-items: center;
    text-align: center;
    font-size: 1.2vw;
    border-radius: 0.25rem;
    letter-spacing: 2px;
    cursor: pointer;
    margin-top: 1vw;
    color: lightcoral;
    border-color: transparent;
    background-color: transparent;
    margin: 0 auto;
}

.clear-btn:hover {
    color: red;
  } */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Gilroy';
}

html, body {
    height: 100%;
    width: 100%;
}

.main {
    height: 100%;
    width: 100%;
    background-color: rgb(239, 249, 253);
    padding: 5vh 5vw;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.container {
    min-height: 20vh;
    width: 90%;
    max-width: 600px;
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease-in-out;
}

.container:hover {
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.3);
}

.container h3 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.form-control {
    display: flex;
    justify-content: center;
}

#grocery {
    padding: 0.75rem;
    font-size: 1rem;
    background-color: rgb(239, 249, 253);
    flex: 1;
    border: 1px solid grey;
    margin-bottom: 1rem;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

#grocery:focus {
    outline: none;
    border: 3px solid rgb(148, 216, 239);
}

.submit-btn {
    background-color: rgb(148, 216, 239);
    min-width: 110px;
    color: black;
    border: 1px solid grey;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    padding: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.submit-btn:hover {
    background-color: rgb(96, 200, 235);
    color: white;
}

.grocery-container {
    margin-top: 1rem;
    visibility: hidden;
    min-height: 10vh;
}

.show-container {
    visibility: visible;
}

.grocery-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0.5rem 1rem;
    text-transform: capitalize;
    border-radius: 10px;
    font-size: 1rem;
}

.title {
    flex: 1;
    overflow-wrap: break-word;
    word-break: break-all;
}

.btn-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edit-btn, .delete-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
}

.edit-btn {
    color: green;
}

.delete-btn {
    color: red;
}

.alert {
    margin-bottom: 1rem;
    height: 1.5rem;
    display: grid;
    align-items: center;
    text-align: center;
    font-size: 0.875rem;
    border-radius: 0.25rem;
    letter-spacing: 3px;
    text-transform: capitalize;
}

.alert-fail {
    color: rgb(92, 22, 22);
    background: lightcoral;
}

.alert-success {
    color: rgb(22, 99, 22);
    background: lightgreen;
}

.clear-btn {
    text-transform: capitalize;
    height: 2rem;
    display: grid;
    align-items: center;
    text-align: center;
    font-size: 1rem;
    border-radius: 0.25rem;
    letter-spacing: 2px;
    cursor: pointer;
    margin: 1rem auto 0;
    color: lightcoral;
    border-color: transparent;
    background-color: transparent;
}

.clear-btn:hover {
    color: red;
}


@media screen and (max-width: 767px) {
    .main {
    padding: 3vh 3vw;
    }
    
    .container {
    padding: 1rem;
    width: 95%;
    }
    
    .container h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    }
    
    #grocery, .submit-btn {
    padding: 0.5rem;
    font-size: 0.875rem;
    }
    
    .submit-btn {
    min-width: 80px;
    }
    
    .grocery-item {
    font-size: 0.875rem;
    padding: 0.4rem 0.75rem;
    }
    
    .alert {
    font-size: 0.75rem;
    letter-spacing: 2px;
    height: 1.25rem;
    }
    
    .clear-btn {
    font-size: 0.875rem;
    height: 1.75rem;
    }
}