/* TinyWildPages color tool v0.7.0 */
.twp-ct {
    max-width: 920px;
    margin: 0 auto;
    font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #23324a;
}

.twp-ct-note {
    font-size: 17px;
    line-height: 1.5;
    margin: 0 0 14px;
}

/* Layout: picture left, tools in a side panel on wide screens.
   On small screens the toolbar pins to the bottom while you color. */
.twp-ct-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: start;
}

.twp-ct-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    background: #ffffff;
    border: 2px solid #23324a;
    border-radius: 20px;
    padding: 14px;
    margin-bottom: 0;
    box-shadow: 0 4px 16px rgba(35, 50, 74, 0.08);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.twp-ct-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.twp-ct-group .twp-ct-btn {
    flex: 1;
    justify-content: center;
}

.twp-ct-sep {
    height: 2px;
    align-self: stretch;
    background: rgba(35, 50, 74, 0.12);
    border-radius: 2px;
}

.twp-ct-dot {
    display: inline-block;
    flex: none;
    border-radius: 50%;
    background: #23324a;
}

@media (max-width: 899px) {
    .twp-ct-layout {
        display: flex;
        flex-direction: column;
    }

    /* Compact icon bar: one sideways-scrolling row pinned to the bottom. */
    .twp-ct-toolbar {
        position: sticky;
        bottom: 0;
        z-index: 20;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        padding: 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        max-height: none;
        overflow-y: visible;
        margin-bottom: 0;
    }

    .twp-ct-toolbar::-webkit-scrollbar {
        display: none;
    }

    .twp-ct-toolbar .twp-ct-group,
    .twp-ct-toolbar .twp-ct-palette {
        flex-wrap: nowrap;
        flex: none;
    }

    .twp-ct-toolbar .twp-ct-btn {
        flex: none;
        min-width: 44px;
        padding: 10px;
        justify-content: center;
    }

    .twp-ct-toolbar .twp-ct-btn .twp-ct-label,
    .twp-ct-toolbar .twp-ct-custom .twp-ct-label {
        display: none;
    }

    .twp-ct-toolbar .twp-ct-custom {
        flex: none;
    }

    .twp-ct-sep {
        width: 2px;
        height: 44px;
        align-self: center;
        flex: none;
    }
}

.twp-ct-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 2px solid #23324a;
    background: #ffffff;
    color: #23324a;
    font-family: "Fredoka", "Nunito", sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.twp-ct-btn svg {
    flex: none;
}

.twp-ct-btn span {
    white-space: nowrap;
}

.twp-ct-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.twp-ct-arrow {
    padding: 10px 14px;
}

.twp-ct-shape {
    width: 16px;
    height: 16px;
    display: inline-block;
    flex: none;
}

.twp-ct-shape-round {
    border-radius: 50%;
    background: #23324a;
}

.twp-ct-shape-square {
    background: #23324a;
}

.twp-ct-shape-spray {
    border-radius: 50%;
    border: 2px dashed #23324a;
}

.twp-ct-btn.is-active {
    background: #23324a;
    color: #fff8ec;
}

.twp-ct-primary {
    background: #ff6f59;
    border-color: #ff6f59;
    color: #ffffff;
}

.twp-ct-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.twp-ct-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #23324a;
    padding: 0;
    cursor: pointer;
}

.twp-ct-swatch.is-active {
    outline: 3px solid #ffc845;
    outline-offset: 2px;
}

.twp-ct-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
}

.twp-ct-custom input {
    width: 44px;
    height: 44px;
    border: 2px solid #23324a;
    border-radius: 50%;
    padding: 2px;
    background: #ffffff;
    cursor: pointer;
}

/* The picture fills its area edge to edge — no border around it (Babar,
   2026-11-09). The whole image is the visible area. The dashed outline
   below only shows while a file is dragged over the picture. */
.twp-ct-canvas-wrap {
    position: relative;
    background: #ffffff;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.twp-ct-canvas-wrap.is-drop {
    outline: 3px dashed #ff6f59;
    outline-offset: -6px;
}

.twp-ct-cursor {
    position: absolute;
    display: none;
    pointer-events: none;
    border: 2px solid #23324a;
    background: rgba(255, 200, 69, 0.15);
    transform: translate(-50%, -50%);
    z-index: 5;
}

.twp-ct-cursor.round {
    border-radius: 50%;
}

.twp-ct-cursor.square {
    border-radius: 0;
}

.twp-ct-cursor.spray {
    border-radius: 50%;
    border-style: dashed;
}

.twp-ct-canvas-wrap canvas {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    touch-action: none;
    cursor: crosshair;
}

/* Loading overlay: Tiko waits with the visitor until the picture is ready. */
.twp-ct-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #fff8ec;
    z-index: 10;
    transition: opacity 0.4s ease;
}

.twp-ct-loading.is-done {
    opacity: 0;
    pointer-events: none;
}

.twp-ct-loading img {
    animation: twp-ct-bob 1.6s ease-in-out infinite;
}

@keyframes twp-ct-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.twp-ct-loading p {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    text-align: center;
    padding: 0 16px;
}

.twp-ct-saved {
    font-size: 15px;
    color: #23324a;
    min-height: 22px;
    margin: 10px 0 0;
}

@media print {
    .twp-ct-toolbar,
    .twp-ct-head,
    .twp-ct-saved {
        display: none !important;
    }
}
