/**
 * Kippah Editor — Additional / Supplemental Styles
 * Supplements kippah-editor.css with component-specific overrides
 */

/* ============================================================
   Inside Personalization Sections
   ============================================================ */
.inside-personalization-section-container {
    background: var(--kippah-bg);
    border: 1px solid var(--kippah-border);
    border-radius: var(--kippah-radius);
    padding: 20px;
    margin-top: 16px;
}

/* ============================================================
   Step Panel Animations
   ============================================================ */
.kippah-wizard__panel {
    animation: kippahFadeUp 0.3s ease;
}

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

/* ============================================================
   Occasions
   ============================================================ */
.kippah-occasions__carousel::-webkit-scrollbar {
    height: 4px;
}

.kippah-occasions__carousel::-webkit-scrollbar-track {
    background: transparent;
}

.kippah-occasions__carousel::-webkit-scrollbar-thumb {
    background: var(--kippah-border-dark);
    border-radius: 2px;
}

/* ============================================================
   Secondary / Tertiary Color Sections (JS show/hide)
   ============================================================ */
.secondary-colors,
.tertiary-colors {
    transition: opacity 0.2s ease;
}

/* ============================================================
   Monogram Input
   ============================================================ */
.monogram-input-wrap {
    gap: 8px;
}

/* ============================================================
   Six-panel Extra Stitching Options
   ============================================================ */
.six-panel-extra-options {
    border: 1px solid var(--kippah-border);
    border-radius: var(--kippah-radius);
    padding: 16px;
    margin-top: 12px;
    background: var(--kippah-bg-light);
}

.six-panel-extra-options .detail-label {
    margin-bottom: 12px;
}

/* ============================================================
   Stitching Color Options  (Final Step)
   ============================================================ */
.stitching-colors-wrapper {
    margin-bottom: 18px;
}

.stitching-color-wheels-wrapper {
    display: none;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.stitching-color-wheels-wrapper.visible {
    display: flex;
}

.color-wheel {
    width: 100%;
    height: 32px;
    border-radius: var(--kippah-radius-sm);
    border: 1px solid var(--kippah-border);
    background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
    cursor: crosshair;
}

/* ============================================================
   Spinner / Loading (button)
   ============================================================ */
.kippah-btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.kippah-btn.loading .kippah-btn__text {
    visibility: hidden;
}

.kippah-btn.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin: -9px 0 0 -9px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: kippahSpin 0.8s linear infinite;
}

/* ============================================================
   Panel type section visibility helpers
   ============================================================ */
.four-panel-section,
.six-panel-section {
    transition: opacity 0.2s ease;
}

/* ============================================================
   Customize form panel containers
   ============================================================ */
.customize-form-panel {
    display: block;
    width: 100%;
}

/* ============================================================
   Selected swatch in color dropdown header
   ============================================================ */
.custom-personalization-color-swatches-container .color-swatches-summary {
    position: relative;
}

.custom-personalization-color-swatches-container .color-swatches-summary .current-swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.12);
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    display: inline-block;
    vertical-align: middle;
}

/* ============================================================
   Hebrew Keyboard Modal
   ============================================================ */
/* Matched to the single-product keyboard (.mazel-hebrew-keyboard in the
   theme's style.css) so both pages present the same design. */
.kippah-hebrew-keyboard {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    background: #fff;
    border: 1px solid var(--color-light-muted, #e2e8f0);
    border-radius: 10px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
    padding: 12px;
    width: 405px;
    max-width: calc(100vw - 16px);
}

.kippah-keyboard__content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kippah-keyboard__row {
    display: flex;
    gap: 6px;
    justify-content: center;
}

/* Keys stretch to fill the row rather than sitting at a fixed width and
   wrapping — that difference was the most visible one between the two pages. */
.kippah-keyboard__row button {
    flex: 1 1 0;
    min-width: 30px;
    height: 38px;
    border: 1px solid #d6d9de;
    border-radius: 6px;
    background: #f8f9fb;
    color: var(--color-navy, #1b2e4b);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}

.kippah-keyboard__row button:hover {
    background: var(--color-navy, #1b2e4b);
    border-color: var(--color-navy, #1b2e4b);
    color: #fff;
}

.kippah-keyboard__actions button {
    font-size: 13px;
    font-weight: 600;
}

.kippah-keyboard__close {
    background: var(--color-navy, #1b2e4b) !important;
    color: #fff !important;
    border-color: var(--color-navy, #1b2e4b) !important;
}

/* ============================================================
   Responsive extras
   ============================================================ */
@media (max-width: 600px) {
    .kippah-imprint__row {
        grid-template-columns: 1fr;
    }

    .customize-select-wrap {
        grid-template-columns: 1fr;
    }

    .kippah-personalization__tabs {
        flex-direction: column;
    }

    .kippah-quantity,
    .qty-stepper {
        width: 100%;
        justify-content: flex-start;
    }
}
/* Keyboard action row + space key — parity with the single-product keyboard.
   JS sets left/top to anchor the panel beside the field; these override the
   bottom-centre pinning above only once that happens (inline styles win). */
.kippah-keyboard__actions {
    display: flex;
    gap: 6px;
}

/* !important because `.kippah-keyboard__row button` (0,1,1) out-specifies this
   (0,1,0) and would otherwise flatten the space bar to one key's width.
   Matches .mazel-keyboard__space on the single-product page. */
.kippah-keyboard__space {
    flex: 3 1 0 !important;
}

.kippah-keyboard__actions .kippah-keyboard__backspace,
.kippah-keyboard__actions .kippah-keyboard__close {
    flex: 1 1 0;
}

@media (max-width: 550px) {
    .kippah-hebrew-keyboard {
        left: 0 !important;
        right: 0;
        top: auto !important;
        bottom: 0 !important;
        transform: none !important;
        min-width: 0;
        width: 100%;
        border-radius: 12px 12px 0 0;
    }
}
