/* Howei Event Shirt Customiser - chrome + Canvas workspace. */

.howei-shirt-designer {
    margin: 20px 0;
}

.hsd-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 24px;
    border: 1px solid #0057A0;
    background: #fff;
    color: #0057A0;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.hsd-expand-btn:hover,
.hsd-expand-btn[aria-expanded="true"] {
    background: #0057A0;
    color: #fff;
}

.hsd-panel {
    margin-top: 14px;
    border: 1px solid #e2e6ea;
    border-radius: 12px;
    padding: 16px;
    background: #fafbfc;
}

.hsd-loading {
    text-align: center;
    padding: 30px 0;
    color: #667;
    font-size: 14px;
}

.hsd-image-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.hsd-image-picker-item {
    border: 2px solid transparent;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
    cursor: pointer;
    text-align: center;
    width: 86px;
}

.hsd-image-picker-item img {
    width: 100%;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.hsd-image-picker-item span {
    display: block;
    font-size: 10px;
    color: #556;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hsd-image-picker-item.active {
    border-color: #0057A0;
}

.hsd-color-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e6ea;
}

.hsd-color-label {
    font-size: 13px;
    font-weight: 600;
    color: #445;
    margin-right: 2px;
}

.hsd-color-wheel {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #ccd3da;
    cursor: pointer;
    background: none;
}

.hsd-color-wheel::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 50%;
}

.hsd-color-wheel::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

.hsd-color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ccd3da;
    cursor: pointer;
    padding: 0;
}

.hsd-color-swatch:hover {
    box-shadow: 0 0 0 2px #0057A0;
}

.hsd-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.hsd-toolbar button {
    font-size: 13px;
    padding: 7px 14px;
    border-radius: 18px;
    border: 1px solid #ccd3da;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.hsd-toolbar button:hover {
    border-color: #0057A0;
    color: #0057A0;
}

.hsd-canvas-wrap {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    touch-action: none; /* the canvas itself handles drag/pinch; page scroll resumes outside it */
    position: relative;
}

.hsd-canvas-wrap canvas {
    max-width: 100%;
    border-radius: 6px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.hsd-object-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.hsd-object-controls button {
    font-size: 15px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #ccd3da;
    background: #fff;
    cursor: pointer;
}

.hsd-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.hsd-actions button {
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 18px;
    border: 1px solid #ccd3da;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.hsd-btn-primary {
    background: #0057A0 !important;
    border-color: #0057A0 !important;
    color: #fff !important;
}

.hsd-btn-secondary {
    border-color: #0057A0 !important;
    color: #0057A0 !important;
}

.hsd-save-status {
    text-align: center;
    font-size: 12px;
    color: #667;
    margin-top: 8px;
    min-height: 16px;
}

/* Text/colour property mini-panel, appended dynamically next to the toolbar on desktop */
.hsd-props {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
    color: #445;
}

.hsd-props input[type="text"] {
    font-size: 13px;
    padding: 4px 8px;
    border: 1px solid #ccd3da;
    border-radius: 4px;
    width: 120px;
}

.hsd-props input[type="color"] {
    width: 28px;
    height: 24px;
    padding: 0;
    border: 1px solid #ccd3da;
    border-radius: 4px;
}

.hsd-props input[type="range"] {
    width: 90px;
}

@media (max-width: 480px) {
    .hsd-panel {
        padding: 10px;
    }

    .hsd-toolbar button {
        flex: 1 1 calc(50% - 8px);
        text-align: center;
    }

    /* Properties become a fixed bottom sheet on small screens so they never
       cover the canvas or fight with page scroll. */
    .hsd-props {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1050;
        background: #fff;
        border-top: 1px solid #e2e6ea;
        padding: 10px 12px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
        margin-bottom: 0;
    }
}
