/* Reset e Box-Sizing */
*,
*:after,
*:before {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Variáveis */
:root {
    --primary-color: #00274a;
    --secondary-color: #efc400;
    --btn-color: #efc400;
    --text-color: #ccc;
}

/* Tipografia e Base */
body,
button,
input {
    font-family: "Rubik", sans-serif;
    font-weight: 400;
    font-style: normal;
}

body {
    width: 100%;
    min-height: 100vh;
    padding: 0;
    margin: 0;

    font-size: 14px;
    color: #222;

    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: start;
    flex-direction: column;
}

body .app {
    width: 100%;
    padding: 20px;
}

input[type="number"],
input[type="text"] {
    border: 1px solid #aaa;
    padding: 5px;
    font-size: 18px;
    width: 100px;
}

/* Links e Botões */
button,
a.btn,
select {
    height: 46px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid var(--secondary-color);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    text-shadow: none;
    outline: none;
    transition: ease-out .3s all;
}

button:hover,
a.btn:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

button:focus {
    outline: 0;
}

/* Estrutura Principal */
body .main-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 1200px;
    padding: 50px;
    max-width: 100%;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 1px 1px 10px 5px rgba(0, 0, 0, .1);
}

/* Layout Flexível */
.col {
    width: calc(50% - 10px);
}

.view-result-wrap img {
    width: 100%;
    height: 500px;
    object-fit: contain;
}

/* Componentes */
.header-wrap {
    padding: 10px;
    margin-bottom: 10px;
}
.app-logo {
    position: relative;
    width: 350px;
    max-width: 100%;
    margin: 0 auto 10px;
}

.app-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.file-btn {
    position: relative;
}

.file-btn input[type="file"] {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.actions {
    padding: 5px 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    align-items: end;
    gap: 10px;
    margin-bottom: 10px;
}

.actions button,
.actions a.btn {
    margin-top: 16px;
}

.photo-upload-wrap {
    position: relative;
    width: 100%;
    height: 500px;
    margin: 0;
}

#photo-upload-container:not(.ready) .photo-upload-wrap::after {
    content: 'Selecione uma imagem';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    color: #fff;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

#photo-upload-container .view-result,
#photo-collage-container #collage-result-download {
    display: none;
}

#photo-upload-container.ready .view-result,
#photo-collage-container.ready #collage-result-download {
    display: block;
}

.croppie-container .cr-boundary {
    height: 400px;
}

.collage-wrap {
    display: flex;
    width: fit-content;
    margin: 0 auto;
    border: 2px dashed #ccc;
}

.footer-wrap {
    position: relative;
    height: 50px;
}

.social-wrap {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    text-align: center;
}

.social-icons {
    display: flex;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 5px;
    border-radius: 4px 4px 0 0;
    width: 200px;
    max-width: 100%;
    margin: 0 auto;
    gap: 10px;
}

.social-icon {
    display: flex;
    transition: ease .3s all;
}

.social-icon:hover {
    transform: scale(1.1);
}

.social-icon img {
    width: 40px;
    height: 40px;
}

/* Seletores Específicos */
.ifz-select {
    display: flex;
    flex-direction: column;
    min-width: 50%;
}

.ifz-select label {
    font-style: italic;
}

.ifz-select select {
    width: 100%;
    background: url('../icons/arrow_down.svg') no-repeat 1px var(--primary-color);
    background-position-x: 98%;
    -webkit-appearance: none;
}

.loading .collage-wrap {
    position: relative;
}

.loading .collage-wrap:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border: 5px solid #181818;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.loading .view-result-wrap img {
    opacity: .3;
}

/* Media Queries */
@media (max-width: 991px) {
    body .main-wrap {
        padding: 0px;
        background-color: transparent;
        border-radius: 0px;
        box-shadow: none;
    }

    .col {
        width: 100%;
        padding: 20px;
        border-radius: 5px;
        background-color: #fff;
        box-shadow: 1px 1px 10px 5px rgba(0, 0, 0, .1);
    }

    #photo-upload-container {
        margin-bottom: 50px;
    }

    .croppie-container .cr-slider-wrap {
        margin-top: 50px;
    }

    .view-result-wrap img {
        height: auto;
    }

    button, a.btn, select {
        font-size: 14px;
    }

    .social-icons {
        gap: 15px;
    }
}
@media (max-width: 380px) {
    .actions button, .actions a.btn {
        margin-top: 0px;
    }
}