/* ============================================================
   Creatorhunt — Egg Painter UI (Leather/Skeuomorphic Theme)
   ============================================================ */

/* ── Page Layout ─────────────────────────────────────────────── */
.painter-page .main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px 60px;
    gap: 24px;
}

.painter-header {
    text-align: center;
    margin-bottom: 8px;
}

.painter-header h1 {
    font-size: 2.2rem;
    color: #3d1a00;
    text-shadow: 0 2px 0 rgba(255,255,255,0.5), 0 4px 8px rgba(0,0,0,0.2);
    margin-bottom: 8px;
}

.painter-header p {
    color: #7a4f1a;
    font-size: 1rem;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ── Leather Card Container ──────────────────────────────────── */
.painter-card {
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0,0,0,0.03) 2px,
            rgba(0,0,0,0.03) 4px
        ),
        linear-gradient(145deg, #c0804a, #a0602a 40%, #8b4513 70%, #a0602a);
    border: 3px solid #5c2a00;
    border-radius: 16px;
    padding: 24px;
    box-shadow:
        0 8px 24px rgba(0,0,0,0.4),
        inset 0 2px 4px rgba(255,255,255,0.18),
        inset 0 -3px 6px rgba(0,0,0,0.3);
    max-width: 560px;
    width: 100%;
}

/* ── Egg Canvas Wrapper ──────────────────────────────────────── */
.egg-canvas-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

#egg-canvas {
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5), inset 0 2px 6px rgba(255,255,255,0.15);
    cursor: crosshair;
    display: block;
    background: #fff;
    touch-action: none;
}

/* ── Tool Bar ────────────────────────────────────────────────── */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 16px;
}

.tool-btn {
    background: linear-gradient(145deg, #e8a060, #b86020);
    border: 2px solid #7a3a00;
    border-radius: 10px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 7px 14px;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.25);
    transition: all 0.15s ease;
    font-family: inherit;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.tool-btn:hover {
    background: linear-gradient(145deg, #f0a870, #c87030);
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.3);
}

.tool-btn:active,
.tool-btn.active {
    background: linear-gradient(145deg, #9a4010, #b86020);
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.4), inset 0 2px 4px rgba(0,0,0,0.3);
}

/* ── Color Row ───────────────────────────────────────────────── */
.color-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 14px;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid rgba(0,0,0,0.25);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.color-swatch:hover,
.color-swatch.selected {
    transform: scale(1.2);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4), 0 0 0 3px rgba(255,255,255,0.7);
}

/* Custom colour picker swatch */
#custom-color-swatch {
    position: relative;
    overflow: hidden;
}
#custom-color-input {
    position: absolute;
    inset: -4px;
    opacity: 0;
    cursor: pointer;
    width: 150%;
    height: 150%;
}

/* ── Brush Size Slider ───────────────────────────────────────── */
.brush-row {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

.brush-row label {
    color: #f5ddb5;
    font-size: 0.85rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

#brush-size {
    -webkit-appearance: none;
    width: 140px;
    height: 6px;
    background: linear-gradient(90deg, #f5ddb5, #8b4513);
    border-radius: 3px;
    outline: none;
}
#brush-size::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(145deg, #fff, #d4a060);
    border: 2px solid #7a3a00;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

#brush-size-label {
    color: #f5ddb5;
    font-size: 0.82rem;
    font-weight: 700;
    min-width: 28px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* ── Egg Name & Description Inputs ──────────────────────────── */
.input-group {
    margin-bottom: 12px;
}

.input-group label {
    display: block;
    color: #f5ddb5;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.input-group input,
.input-group textarea {
    width: 100%;
    background: linear-gradient(145deg, #f9f3e8, #ede0c4);
    border: 2px solid #7a3a00;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.9rem;
    font-family: inherit;
    color: #3d1a00;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.15), 0 1px 0 rgba(255,255,255,0.2);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: #d4600a;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.15), 0 0 0 3px rgba(212,96,10,0.2);
}

.input-group textarea {
    height: 70px;
    resize: vertical;
}

/* ── Submit Button ───────────────────────────────────────────── */
.submit-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(145deg, #e8c84a, #c8a020);
    border: 3px solid #7a5000;
    border-radius: 12px;
    color: #3d2200;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3), inset 0 2px 0 rgba(255,255,255,0.3);
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
    transition: all 0.2s ease;
    margin-top: 6px;
}

.submit-btn:hover:not(:disabled) {
    background: linear-gradient(145deg, #f0d860, #d8b030);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.35), inset 0 2px 0 rgba(255,255,255,0.35);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3), inset 0 2px 4px rgba(0,0,0,0.2);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Status Message ──────────────────────────────────────────── */
#painter-status {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f5ddb5;
    min-height: 1.4em;
    margin-top: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

#painter-status.success { color: #a4f5a4; }
#painter-status.error   { color: #ffaaaa; }

/* ── Dividers ────────────────────────────────────────────────── */
.painter-divider {
    border: none;
    border-top: 2px solid rgba(0,0,0,0.25);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin: 14px 0;
}

/* ── Info note ───────────────────────────────────────────────── */
.painter-note {
    text-align: center;
    font-size: 0.82rem;
    color: #e8c890;
    margin-top: 10px;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
