/* CPG Native Coloring Tool Styles - Pro */

.cpg-native-coloring {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cpg-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border-bottom: 1px solid #eee;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.cpg-sub-toolbar {
    background: #f9f9f9;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cpg-emoji-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.cpg-emoji-item {
    font-size: 42px;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.2s;
    background: #fff;
    border: 1px solid #eee;
    line-height: 1;
}

.cpg-emoji-item:hover, .cpg-emoji-item.active {
    background: #e3f2fd;
    border-color: #2196f3;
    transform: scale(1.1);
}

#cpg-text-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

#cpg-font-size {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.cpg-tool-group {
    display: flex;
    gap: 4px;
    padding-right: 8px;
    border-right: 1px solid #eee;
}

.cpg-tool-group:last-child { border-right: none; }

.cpg-tool-btn, .cpg-action-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #555;
}

.cpg-tool-btn:hover, .cpg-action-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
    color: #000;
}

.cpg-tool-btn.active {
    background: #2196f3;
    border-color: #1976d2;
    color: #fff;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

.cpg-workspace {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

.cpg-canvas-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    background: #e0e0e0;
    padding: 30px;
}

#cpg-main-canvas {
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    cursor: crosshair;
    transform-origin: center center;
}

.cpg-color-sidebar {
    width: 90px;
    background: #fff;
    border-left: 1px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    gap: 20px;
}

.cpg-color-picker-container {
    position: relative;
    width: 54px;
    height: 54px;
}

#cpg-color-input {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; cursor: pointer; z-index: 2;
}

.cpg-color-picker-visual {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 0 1px #ddd, 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.cpg-palette {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
}

.cpg-palette-color {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: transform 0.1s;
}

.cpg-palette-color.active {
    border: 2px solid #2196f3;
    transform: scale(1.1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.cpg-brush-size {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
}

#cpg-brush-range {
    -webkit-appearance: none;
    width: 120px;
    height: 8px;
    background: #eee;
    border-radius: 6px;
    outline: none;
}

#cpg-brush-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #2196f3;
    border-radius: 50%;
    cursor: pointer;
}

#cpg-brush-value {
    font-size: 12px;
    font-weight: 700;
    color: #777;
}

/* Fullscreen */
.cpg-coloring-box.is-expanded {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 99999; margin: 0; border-radius: 0;
}

.cpg-coloring-box.is-expanded .cpg-coloring-container {
    height: calc(100vh - 60px);
}

/* Expand Button */
.cpg-expand-btn {
    background: #ff4757;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.cpg-expand-btn:hover { background: #ff6b81; transform: translateY(-1px); }

.cpg-expand-btn .btn-text::before { content: "Tela Cheia"; }
.cpg-coloring-box.is-expanded .cpg-expand-btn .btn-text::before { content: "Fechar"; }

/* Mobile */
@media (max-width: 600px) {
    .cpg-workspace { flex-direction: column; }
    .cpg-color-sidebar {
        width: 100%; height: auto;
        flex-direction: row;
        border-left: none; border-top: 1px solid #eee;
        padding: 10px; overflow-x: auto;
    }
    .cpg-palette { display: flex; width: auto; }
    #cpg-brush-range { -webkit-appearance: slider-horizontal; width: 100px; height: 12px; }
}
