/* The file for designing my calculator */
body {
    background-color: rgb(206, 253, 237);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0%;
    padding: 0%;
    min-height: 100vh;
}

/* To format Tip Calculator Title */
h1 {
    color: rgb(0, 109, 18);
    font-size: 40px;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    max-width: 500px;
    width: 50vw;
    min-height: 75vh;
    border: 2px solid rgb(156, 228, 156);
    border-radius: 20px;
    box-shadow: 4px 4px 4px rgb(0, 78, 0, 0.7);
    animation: slideup 3s;
}

form {
    margin-top: 10px;
    padding: 3vw;
    display: grid;
    gap: 15px;
}

label {
    color: darkgreen;
    font-size: 20px;
}

.total {
    font-size: 20px;
    color: darkgreen;
}

.error {
    display: none;
}

.error.show {
    display: block;
    color: yellow;
    background-color: red;
    display: block;
    text-align: center;
    border: 2px solid red;
    border-radius: 10px;
}

#reset_button {
    width: 75%;
    height: 4vh;
    color: white;
    background-color: red;
    text-align: center;
    font-size: 1.6rem;
    display: block;
    margin: 0 auto;
    border: 2px solid red;
    border-radius: 10px;
    box-shadow: 4px 4px 4px rgba(240, 0, 0, 0.2);
}

/* tablets and small screens */
@media (max-width: 768px) {
    .container {
        width: 90vw;
        height: auto;
        margin-top: 5vw;
    }

    form {
        padding: 5vw;
    }

    h1 {
        font-size: 28px;
    }

    label,
    .total {
        font-size: 16px;
    }

    #reset_button {
        font-size: 16px;
        height: auto;
        padding: 10px;
    }
}

@keyframes slideup {
    from {
        transform: translateY(200px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}