:root {
    --pw-navy: #1a2744;
    --pw-navy-mid: #243257;
    --pw-blue: #2d4a8a;
    --pw-accent: #3a6fd8;
    --pw-light-bg: #eef1f7;
    --pw-text: #1a2744;
    --pw-muted: #7a8aaa;
    --pw-white: #ffffff;
    --pw-border: #d0d8ee;
}

#piwork-ihsp {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transition: opacity 0.3s ease;
}

#piwork-ihsp.piwork-ihsp-hidden {
    display: none;
}

#piwork-ihsp.piwork-ihsp-out {
    opacity: 0;
    pointer-events: none;
}

.piwork-ihsp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 30, 60, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ===== Sheet ===== */
.piwork-ihsp-sheet {
    position: relative;
    z-index: 1;
    background: var(--pw-white);
    width: 100%;
    max-width: 500px;
    border-radius: 28px 28px 0 0;
    padding: 12px 24px 44px;
    direction: rtl;
    animation: pw-slide-up 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
    box-shadow: 0 -8px 40px rgba(26, 39, 68, 0.18);
}

@keyframes pw-slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Handle */
.piwork-ihsp-handle {
    width: 40px;
    height: 4px;
    background: var(--pw-border);
    border-radius: 2px;
    margin: 0 auto 20px;
}

/* Close */
.piwork-ihsp-close {
    position: absolute;
    top: 18px;
    left: 20px;
    background: var(--pw-light-bg);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.piwork-ihsp-close svg {
    width: 16px;
    height: 16px;
    color: var(--pw-navy);
}
.piwork-ihsp-close:hover { background: var(--pw-border); }

/* Icon */
.piwork-ihsp-icon-wrap {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    overflow: hidden;
    margin: 0 auto 16px;
    box-shadow: 0 6px 20px rgba(26, 39, 68, 0.2);
    animation: pw-pop 0.5s 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes pw-pop {
    from { transform: scale(0.6); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.piwork-ihsp-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Title */
.piwork-ihsp-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--pw-navy);
    text-align: center;
    margin: 0 0 6px;
    font-family: inherit;
}

.piwork-ihsp-sub {
    font-size: 13px;
    color: var(--pw-muted);
    text-align: center;
    margin: 0 0 24px;
    line-height: 1.6;
}

/* Steps */
.piwork-ihsp-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.piwork-ihsp-step {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--pw-light-bg);
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid var(--pw-border);
    animation: pw-fade-up 0.4s both;
}

.piwork-ihsp-step[data-step="1"] { animation-delay: 0.3s; }
.piwork-ihsp-step[data-step="2"] { animation-delay: 0.4s; }
.piwork-ihsp-step[data-step="3"] { animation-delay: 0.5s; }
.piwork-ihsp-step[data-step="4"] { animation-delay: 0.6s; }

@keyframes pw-fade-up {
    from { transform: translateY(14px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.piwork-ihsp-num {
    width: 26px;
    height: 26px;
    background: var(--pw-navy);
    color: var(--pw-white);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.piwork-ihsp-step-body {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.piwork-ihsp-step-icon {
    width: 40px;
    height: 40px;
    background: var(--pw-navy);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.piwork-ihsp-step-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* Three dots icon */
.piwork-ihsp-three-dots {
    gap: 4px;
}
.piwork-ihsp-three-dots span {
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    display: block;
}

.piwork-ihsp-step-body p {
    font-size: 13px;
    color: var(--pw-text);
    margin: 0;
    line-height: 1.5;
}

.piwork-ihsp-step-body p strong {
    color: var(--pw-navy);
    font-weight: 700;
}

/* Arrow hint */
.piwork-ihsp-arrow-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--pw-accent);
    font-size: 12px;
    animation: pw-bounce 1.3s ease-in-out infinite;
    margin-top: 4px;
}

@keyframes pw-bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(6px); }
}
