/* sugipay-preview.css */
.sugipay-demo-screen {
    height: var(--sugipay-screen-height,338px);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    overscroll-behavior: contain;
    background: #fff;
    color: var(--color-text-primary);
    font-family: var(--font-family);
    font-size: 13px;
    line-height: 1.5;
}

.sugipay-demo-screen[hidden] {
    display: none;
}

.sugipay-demo-screen::-webkit-scrollbar {
    display: none;
}

.sugipay-demo-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-bottom: 1px solid var(--color-gray-20);
    font-size: 14px;
    font-weight: 600;
}

.sugipay-demo-back {
    position: absolute;
    left: 8px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.sugipay-demo-back svg,
.sugipay-demo-field svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sugipay-demo-body {
    padding: 20px 12px 24px;
}

.sugipay-demo-intro {
    margin-bottom: 20px;
}

.sugipay-demo-intro h3 {
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 22px;
    font-weight: 700;
}

.sugipay-demo-intro p,
.sugipay-demo-section-help {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 11px;
    line-height: 16px;
}

.sugipay-demo-field {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 42px;
    padding: 4px 10px;
    border: 1px solid var(--color-gray-30);
    border-radius: 12px;
    background: #fff;
}

.sugipay-demo-field small {
    color: var(--color-text-secondary);
    font-size: 10px;
    line-height: 14px;
}

.sugipay-demo-field strong {
    font-size: 13px;
    font-weight: 600;
}

.sugipay-demo-field > svg {
    position: absolute;
    right: 12px;
    top: 12px;
    color: var(--color-text-secondary);
}

.sugipay-demo-add-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) 42px;
    gap: 8px;
}

.sugipay-demo-add {
    display: grid;
    place-items: center;
    border: 1px solid var(--color-gray-20);
    border-radius: 12px;
    background: var(--color-gray-10);
    color: var(--color-text-secondary);
    font-size: 23px;
    font-weight: 300;
}

.sugipay-demo-help {
    margin: 5px 3px 10px;
    color: var(--color-text-secondary);
    font-size: 10px;
    line-height: 15px;
}

.sugipay-demo-stack {
    display: grid;
    gap: 10px;
}

.sugipay-demo-contact {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-gray-20);
}

.sugipay-demo-badge {
    display: inline-block;
    margin-left: 3px;
    padding: 1px 4px;
    border-radius: 8px;
    background: var(--color-gray-10);
    color: var(--color-text-secondary);
    font-size: 9px;
    font-weight: 500;
}

.sugipay-demo-placeholder {
    color: var(--color-text-secondary);
    font-size: 12px;
}

.sugipay-demo-memo {
    min-height: 58px;
    justify-content: flex-start;
    padding-top: 10px;
}

.sugipay-demo-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    margin-top: 18px;
    padding: 0 10px;
    border: 0;
    border-radius: 12px;
    background: var(--color-primary);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.sugipay-demo-summary {
    padding: 14px;
    border: 1px solid var(--color-gray-20);
    border-radius: 16px;
    background: #f7f9fb;
    box-shadow: 0 3px 8px rgb(30 41 59 / 8%);
}

.sugipay-demo-summary-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    font-size: 12px;
}

.sugipay-demo-edit {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-primary);
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
}

.sugipay-demo-summary dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.sugipay-demo-summary dl > div {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 8px;
}

.sugipay-demo-summary dt {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 10px;
    font-weight: 400;
}

.sugipay-demo-summary dd {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
}

.sugipay-demo-summary .sugipay-demo-empty {
    color: var(--color-text-secondary);
    font-weight: 400;
}

.sugipay-demo-section-title {
    margin: 28px 0 6px;
    font-size: 15px;
    font-weight: 700;
}

.sugipay-demo-section-help {
    margin-bottom: 16px;
}

.sugipay-demo-expiry {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
}

.sugipay-demo-select {
    padding-right: 30px;
}

.sugipay-demo-select::after {
    position: absolute;
    top: 16px;
    right: 13px;
    width: 8px;
    height: 8px;
    border-right: 1px solid var(--color-text-secondary);
    border-bottom: 1px solid var(--color-text-secondary);
    content: '';
    transform: rotate(45deg);
}

.sugipay-demo-installment {
    display: grid;
    grid-template-columns: minmax(0,1fr) 88px;
    gap: 8px;
}

.sugipay-demo-event {
    display: grid;
    place-items: center;
    border: 1px solid var(--color-primary-10);
    border-radius: 12px;
    background: var(--color-primary-5);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 600;
}

.sugipay-demo-message {
    position: absolute;
    z-index: 3;
    right: 8px;
    top: 8px;
}

.sugipay-demo-message b {
    font: inherit;
}

[data-sugipay-native] .service-process-preview-phone {
    left: var(--sugipay-phone-left,0px);
    top: var(--sugipay-phone-top,52px);
    zoom: var(--service-preview-phone-scale,1);
    transform: none;
}

.sugipay-demo-screen button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
