:host {
    display: inline-block;
}

.formlabel {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary, #6b7280);
    margin-bottom: 4px;

    &.labelFocused {
        color: var(--primary-color, #6f42c1);
    }
}

.stp-field {
    position: relative;
    display: inline-block;
}

.stp-trigger {
    box-sizing: border-box;
    height: 36px;
    width: 100%;
    min-width: 120px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--border-default, #d1d5db);
    border-radius: 8px;
    background: var(--bg-surface, #fff);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    cursor: pointer;
    user-select: none;

    &.placeholder {
        font-weight: 400;
        color: var(--text-placeholder, #9ca3af);
    }

    &.readonly {
        cursor: not-allowed;
        background: var(--bg-disabled, #f3f4f6);
        color: var(--text-disabled, #9ca3af);
    }

    &.MandatoryField {
        border-color: #e94f37;
    }
}

.stp-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998; // ⬅️ was 1000 — raised well above CDK/other overlay defaults
}

.stp-popover {
    position: fixed;
    top: 70%;
    left: 40%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    width: 200px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.stp-wheel-col {
    // position: relative;
    // display: flex;
    // flex-direction: column;
    flex: 1;
}

.stp-step-btn {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1;
    background: var(--bg-surface, #fff);
}

.stp-step-btn:first-of-type {
    top: 0;
}

.stp-step-btn:last-of-type {
    bottom: 0;
}

// ✅ NEW: visible focus ring so keyboard users can see which wheel is active
.stp-wheel:focus {
    outline: 2px solid var(--primary-color, #6f42c1);
    outline-offset: -2px;
}

.stp-wheel-group {
    position: relative;
    display: flex;
    height: 280px; // ⬅️ 5 visible rows at the new 56px row height
    padding: 0 16px;
}

/* ✅ CHANGED: thin top/bottom rule lines around the selected row,
   matching Image 2, instead of a filled highlight box */
.stp-wheel-band {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 56px;
    transform: translateY(-50%);
    border-top: 1px solid var(--border-default, #d1d5db);
    border-bottom: 1px solid var(--border-default, #d1d5db);
    background: transparent;
    pointer-events: none;
}

.stp-wheel {
    position: relative;
    height: 280px; // fixed — matches .stp-pad math and ITEM_HEIGHT
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    text-align: center;
    scrollbar-width: none;

    &::-webkit-scrollbar {
        display: none;
    }
}

.stp-wheel--period {
    flex: 0 0 70px;
}

.stp-pad {
    height: 112px; // ⬅️ (5 rows - 1) / 2 * 56px, centers first/last item at the new row height
}

.stp-item {
    height: 56px; // ⬅️ bigger touch target, matches Image 2's scale
    line-height: 56px;
    scroll-snap-align: center;
    font-size: 16px;
    color: var(--text-secondary, #9ca3af);

    &.selected {
        color: var(--text-primary, #111827);
        font-weight: 700;
        font-size: 16px;
    }
}

.stp-colon {
    align-self: center;
    padding: 0 4px;
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary, #111827);
}

.stp-actions {
    display: flex;
    justify-content: flex-end;
    gap: 24px;
    padding: 14px 20px;
    border-top: 1px solid var(--border-subtle, #f0f0f0);

    button {
        background: none;
        border: none;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        padding: 4px;
    }

    .stp-cancel {
        color: var(--text-primary, #1f2937);
    }

    .stp-ok {
        color: var(--primary-color, #6f42c1);
    }
}