@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f2f4fa;
    font-family: 'Roboto', sans-serif;
    padding: 2rem;
}

.main-container {
    padding: 0.6rem;
    border-radius: 5px;
    margin: auto;
    max-width: 768px;
    background-color: #fff;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.main-container:hover{
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Disable operations initially excluding choose image button*/
.main-container.disable :where(.pannel-section, .display-img, .reset-filters, .save-img) {
    opacity: 0.5;
    pointer-events: none;
}

/* Globally values */
h2 {
    display: block;
    text-align: center;
    margin-bottom: 2rem;
}

p {
    margin-bottom: 0.5em;
    color: #003;
    font-weight: 500;
    font-size: 1.1rem;
}

button {
    padding: 0.7em;
    outline: none;
    border-radius: 5px;
    background-color: #f2f4fa;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #0003;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
}

button:hover {
    background-color: #9f9ffd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: 1s ease;
}

.wrapper {
    display: flex;
    gap: 1rem;
}

.wrapper .pannel-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
    border: 1px solid #0003;
    padding: 0.6rem;
}

/* Customising buttons */
.pannel-section .buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 5px;
}

.rotate .buttons button {
    width: 23%;
    padding: 0.3em;
}

.filter .buttons button {
    width: 48%;
}

.filter .buttons button.active {
    transition: 1s ease;
    background-color: #3036dd;
    color: #fff;
}

/* Input Range */
.slider .info {
    display: flex;
    justify-content: space-between;
}

.slider input {
    width: 100%;
}

/* Control pannel */
.controls {
    display: flex;
    justify-content: space-between;
}

.controls button {
    margin-top: 1rem;
}

.reset-filters:hover {
    background-color: #3a3a3a;
    color: #fff;
    transition: 1s ease;
}

.controls .choose-img {
    color: #fff;
    background-color: #3a3a3a;
}

.controls .save-img {
    color: #fff;
    background-color: #3036dd;
}

/* Display Img */
.wrapper .display-img {
    width: 100%;
    height: 380px;
    overflow: hidden;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.wrapper .display-img img {
    height: 100%;
    max-width: 520px;
    width: 100%;
    object-fit: contain;
}

/* Meadia Query */
@media screen and (max-width:540px) {
    body {
        padding: 0;
    }

    .main-container {
        height: 100vh;
    }

    .wrapper {
        flex-wrap: wrap-reverse;
        gap: 0.5rem;
    }

    .wrapper .display-img {
        height: 30vh;
    }
}

@media screen and (max-width:400px) {
    .controls {
        flex-direction: column;
    }

    .wrapper .display-img {
        height: 20vh;
    }

    .controls .row {
        display: flex;
        justify-content: space-between;
    }
}