#ubuy-dialog-root {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

#ubuy-dialog-root.is-open {
    display: flex;
}

body.ubuy-dialog-open {
    overflow: hidden;
}

.ubuy-dialog__panel {
    width: 100%;
    max-width: 270px;
    background: rgba(255, 255, 255, 0.92);
    color: #000;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    padding: 20px 16px 0;
    box-sizing: border-box;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

.ubuy-dialog__title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    color: #000;
    text-align: center;
}

.ubuy-dialog__title:empty {
    display: none;
}

.ubuy-dialog__body {
    font-size: 13px;
    line-height: 1.4;
    color: rgba(60, 60, 67, 0.6);
    margin-bottom: 20px;
    word-break: break-word;
    text-align: center;
}

.ubuy-dialog__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    margin: 0 -16px;
    border-top: 0.5px solid rgba(60, 60, 67, 0.29);
}

.ubuy-dialog__actions button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 17px;
    line-height: 1.3;
    cursor: pointer;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.ubuy-dialog__actions button + button {
    border-top: 0.5px solid rgba(60, 60, 67, 0.29);
}

.ubuy-modal-btn-primary {
    color: #007aff;
    font-weight: 600;
}

.ubuy-modal-btn-primary:active {
    background: rgba(0, 0, 0, 0.05);
}

.ubuy-modal-btn-cancel {
    color: #007aff;
    font-weight: 400;
}

.ubuy-modal-btn-cancel:active {
    background: rgba(0, 0, 0, 0.05);
}

.ubuy-modal-btn-danger {
    color: #ff3b30;
    font-weight: 600;
}

.ubuy-modal-btn-danger:active {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .ubuy-dialog__panel {
    background: rgba(44, 44, 46, 0.92);
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .ubuy-dialog__title {
    color: #fff;
}

[data-theme="dark"] .ubuy-dialog__body {
    color: rgba(235, 235, 245, 0.6);
}

[data-theme="dark"] .ubuy-dialog__actions {
    border-top-color: rgba(84, 84, 88, 0.65);
}

[data-theme="dark"] .ubuy-dialog__actions button + button {
    border-top-color: rgba(84, 84, 88, 0.65);
}

[data-theme="dark"] .ubuy-modal-btn-primary,
[data-theme="dark"] .ubuy-modal-btn-cancel {
    color: #0a84ff;
}

[data-theme="dark"] .ubuy-modal-btn-danger {
    color: #ff453a;
}

[data-theme="dark"] .ubuy-modal-btn-primary:active,
[data-theme="dark"] .ubuy-modal-btn-cancel:active,
[data-theme="dark"] .ubuy-modal-btn-danger:active {
    background: rgba(255, 255, 255, 0.08);
}
