
/* ==========================================
   CONFIGURAÇÃO GERAL
========================================== */

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

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    max-width: 100%;
    background: #FFFFFF;
    font-family: Georgia, serif;
    overflow-x: hidden;
}

/* ==========================================
   ABAS DE CATEGORIAS
========================================== */

.menu-abas {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0;

    width: 100%;
    max-width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    border-bottom: 1px solid #DDDDDD;

    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.menu-abas .aba {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    width: auto;
    min-width: max-content;
    max-width: none;

    padding: 16px 14px;

    border: 1px solid #222222;
    border-bottom: none !important;

    background: #F2F2F2;
    color: #000000;

    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.3;

    text-align: center;
    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;

    box-shadow: none !important;
    outline: none;

    -webkit-tap-highlight-color: transparent;
}

.menu-abas .aba.ativa {
    background: #E5E5E5;
    font-weight: bold;

    border-bottom: none !important;
    box-shadow: none !important;
}

.menu-abas .aba::after {
    display: none !important;
    content: none !important;
}

/* ==========================================
   VISIBILIDADE DAS NOTAS
========================================== */

.pagina[hidden] {
    display: none !important;
}

/* ==========================================
   PÁGINA E CABEÇALHO
========================================== */

.pagina {
    position: relative;

    width: 100%;
    max-width: 600px;

    margin-left: auto;
    margin-right: auto;
}

.cabecalho-arraste {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;

    width: 100%;
    padding: 10px;
}

.cabecalho-arraste button {
    padding: 5px 8px;
    font-size: 16px;
    cursor: pointer;
}

.handle {
    font-size: 24px;
    cursor: pointer;
}

/* ==========================================
   CONTEÚDO DA NOTA
========================================== */

.container {
    display: flex;
    flex-direction: column;
    align-items: center;

    width: 100%;
    min-width: 0;

    margin-top: 30px;
}

/* ==========================================
   TÍTULO
========================================== */

.titulo {
    display: block;

    width: min(560px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);

    margin: 0 auto 60px;
    padding: 5px;

    border: none;
    border-bottom: 1px solid #CCCCCC;

    background: transparent;
    color: #111111;

    font-family: Georgia, serif;
    font-size: 26px;

    text-align: center;
    overflow-wrap: anywhere;
}

/* ==========================================
   SELETOR DE CATEGORIA
========================================== */

.rotulo-categoria {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;

    width: 100%;

    margin: -35px auto 45px;

    color: #222222;
    font-family: Arial, sans-serif;
    font-size: 16px;
    font-weight: bold;
}

.categoria-nota {
    display: block;

    width: min(280px, calc(100vw - 48px));
    max-width: 100%;
    min-height: 46px;

    padding: 10px 12px;

    border: 1px solid #888888;
    border-radius: 8px;

    background: #FFFFFF;
    color: #111111;

    font-family: Arial, sans-serif;
    font-size: 17px;
}

/* ==========================================
   CÍRCULO DAS NOTAS
========================================== */

.circulo {
    position: relative;

    width: 200px;
    height: 200px;

    flex: 0 0 auto;

    margin: 0 auto;

    border: 2px solid #000000;
    border-radius: 50%;
}

/* ==========================================
   CAMPOS COMPACTOS
========================================== */

.circulo .campo {
    position: absolute;

    display: block;

    width: 70px;
    height: 18px;
    min-height: 18px;

    margin: 0;
    padding: 0;

    border: none;
    border-radius: 0;

    background: transparent;
    color: #111111;

    font-family: Georgia, serif;
    font-size: 12px;
    font-weight: normal;
    line-height: 18px;

    text-align: center;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow: hidden;

    resize: none;
    box-shadow: none;

    z-index: 2;
    cursor: text;
}

/* ==========================================
   POSIÇÕES DAS 12 NOTAS
========================================== */

.h1 {
    top: -25px;
    left: 130px;
}

.h2 {
    top: 0;
    right: -35px;
}

.h3 {
    top: 55px;
    right: -75px;
}

.h4 {
    top: 115px;
    right: -75px;
}

.h5 {
    top: 180px;
    right: -35px;
}

.h6 {
    top: 215px;
    left: 55px;
}

.h7 {
    top: 180px;
    left: -35px;
}

.h8 {
    top: 115px;
    left: -60px;
}

.h9 {
    top: 55px;
    left: -60px;
}

.h10 {
    top: 10px;
    left: -35px;
}

.h11 {
    top: -25px;
    left: 0;
}

.h12 {
    top: -35px;
    left: 65px;
}

/* ==========================================
   CAMPO EXPANDIDO AO TOCAR
========================================== */

.circulo .campo:focus,
.circulo .campo.expandido {
    position: fixed;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: calc(100vw - 32px);
    max-width: 420px;

    height: 45vh;
    min-height: 180px;

    padding: 16px;

    border: 2px solid #087F8C;
    border-radius: 10px;

    background: #FFFFFF;
    color: #111111;

    font-family: Georgia, serif;
    font-size: 20px;
    line-height: 1.6;

    text-align: left;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    overflow-y: auto;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);

    z-index: 9999;
}

/* ==========================================
   BOTÕES DA NOTA
========================================== */

.btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;

    width:50%;

    margin: 90px auto 24px;
    padding: 0 6px;
}

.btns button {
    display: block;

    flex: 0 0 auto;

    width: min(345px, calc(100vw - 40px));
    min-height: 58px;

    margin: 0 auto;
    padding: 12px 16px;

    border: none;
    border-radius: 12px;

    background-color: #087F8C;
    color: #FFFFFF;

    font-family: Arial, sans-serif;
    font-size: 22px;
    line-height: 1.3;

    text-align: center;
    white-space: normal;

    box-shadow: none;
    cursor: pointer;
}

.btns button:active {
    opacity: 0.85;
}

/* ==========================================
   COMPATIBILIDADE COM IDs ANTIGOS
========================================== */

#btnSalvar,
#btnApagar,
#btnNewNotepad,
#btnDestruir {
    border: none;
    background: #087F8C;
    color: #FFFFFF;
    border-radius: 7px;
    cursor: pointer;
}

/* ==========================================
   AJUSTES PARA CELULARES
========================================== */

@media (max-width: 480px) {

    /* Abas: não comprimir os nomes */

    .menu-abas .aba {
        flex: 0 0 auto;
        min-width: max-content;
        padding: 16px 14px;
        font-size: 18px;
        white-space: nowrap;
    }

    /* Conteúdo */

    .pagina {
        width: 100%;
        max-width: 100%;
    }

    .container {
        width: 100%;
        margin-top: 30px;
    }

    /* Título */

    .titulo {
        width: calc(100vw - 32px);
        max-width: calc(100vw - 32px);

        font-size: 26px;
        margin-bottom: 60px;
    }

    /* Categoria */

    .rotulo-categoria {
        margin-top: -35px;
        margin-bottom: 45px;
    }

    .categoria-nota {
        width: min(280px, calc(100vw - 48px));
    }

    /* Círculo */

    .circulo {
        width: 200px;
        height: 200px;
    }

    .circulo .campo {
        width: 70px;
        height: 18px;
        min-height: 18px;

        font-size: 12px;
        line-height: 18px;
    }

    /* Campo expandido */

    .circulo .campo:focus,
    .circulo .campo.expandido {
        width: calc(100vw - 32px);
        max-width: 420px;

        height: 45vh;
        min-height: 180px;

        font-size: 20px;
    }

    /* Botões verdes */

    .pagina .btns {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;

        gap: 6px !important;

        width: 100% !important;

        margin: 100px auto 24px !important;
        padding: 0 12px !important;
    }

    .pagina .btns button {
        display: block !important;
        flex: 0 0 auto !important;

        width: min(345px, calc(100vw - 40px)) !important;
        min-height: 58px !important;

        margin: 0 auto !important;
        padding: 12px 16px !important;

        border: none !important;
        border-radius: 12px !important;

        background-color: #087F8C !important;
        color: #FFFFFF !important;

        font-family: Arial, sans-serif !important;
        font-size: 22px !important;
        line-height: 1.3 !important;

        text-align: center !important;
        white-space: normal !important;

        box-shadow: none !important;
    }
}
