* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    /*padding: 20px;*/
}

/* Container principal da toolbar */
.toolbar-container {
    background-color: #ffffff;
    border: 1px solid #d1d1d1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

/* Toolbar principal */
.toolbar {
    display: none;
    align-items: center;
    background: linear-gradient(to bottom, #f8f8f8, #e8e8e8);
    padding: 0px 10px 4px;
    border-bottom: 1px solid #c8c8c8;
    flex-wrap: wrap;
    gap: 5px;
}

/* Grupos de botões */
.toolbar-group {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 0 8px;
    border-right: 1px solid #d1d1d1;
}

    .toolbar-group:last-child {
        border-right: none;
    }

.toolbar-group-title {
    /*border-bottom: 1px solid silver;*/
    color: rgba(44, 90, 160, 1);
    /*margin-bottom: 3px;*/
    /*padding-bottom: 2px;*/
    padding-left: 3px;
    /*font-weight: 400;*/
    font-size: 9px;
    background-color: #d8d8d8;
}

/* Estilo dos botões */
.toolbar-btn {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    min-width: 60px;
    height: 60px;
    background: linear-gradient(to bottom, #ffffff, #f3f3f3);
    border: 1px solid #c1c1c1;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-size: 11px;
    color: #333;
    text-align: center;
}

    /* Ícone do botão */
    .toolbar-btn .icon {
        margin-bottom: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
    }

        .toolbar-btn .icon img {
            width: 24px;
            height: 24px;
        }

    /* Texto do botão */
    .toolbar-btn .text {
        font-size: 11px;
        line-height: 1.2;
        max-width: 70px;
        word-wrap: break-word;
    }

    /* Hover effect */
    .toolbar-btn:hover {
        background: linear-gradient(to bottom, #fff9e6, #ffe4a1);
        border-color: #ffa500;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    }

    /* Active/Click effect */
    .toolbar-btn:active {
        background: linear-gradient(to bottom, #f0f0f0, #e0e0e0);
        transform: translateY(0);
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    }

    /* Botão selecionado/ativo */
    .toolbar-btn.active {
        background: linear-gradient(to bottom, #e6f2ff, #cce7ff);
        border-color: #0078d4;
    }

/* Separador */
.toolbar-separator {
    width: 1px;
    height: 40px;
    background-color: #d1d1d1;
    margin: 0 5px;
}

/* Tooltip */
.toolbar-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    animation: tooltipFadeIn 0.3s ease forwards;
}

@keyframes tooltipFadeIn {
    to {
        opacity: 1;
        bottom: -35px;
    }
}

/* Container de demonstração */
.demo-container {
    margin-top: 30px;
    padding: 20px;
    background-color: white;
    border: 1px solid #d1d1d1;
    border-radius: 4px;
    min-height: 200px;
}

.demo-output {
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

/* Responsividade */
@media (max-width: 768px) {
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-group {
        border-right: none;
        border-bottom: 1px solid #d1d1d1;
        padding: 10px;
        justify-content: center;
    }

    .toolbar-btn {
        min-width: 50px;
        height: 50px;
    }

        .toolbar-btn .text {
            font-size: 10px;
        }
}

/* Animação de clique */
@keyframes clickPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(44, 90, 160, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(44, 90, 160, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(44, 90, 160, 0);
    }
}

.toolbar-btn.clicked {
    animation: clickPulse 0.5s;
}