.swb-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 11050;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: var(--bs-body-font-family, Roboto, system-ui, sans-serif);
}

.swb-modal--open {
    display: flex;
}

body.swb-modal-open {
    overflow: hidden;
}

.swb-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.swb-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.swb-modal__box {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    color: var(--bs-body-color, rgb(165, 169, 180));
    background: var(--bs-secondary-bg, rgb(36, 39, 49));
    border: 1px solid var(--bs-border-color, rgb(35, 39, 50));
    border-radius: var(--bs-border-radius-lg, 10px);
    box-shadow: var(--bs-box-shadow-lg, 0 1rem 3rem rgba(0, 0, 0, 0.275));
    overflow: hidden;
}

.swb-modal__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
}

.swb-modal__title {
    margin: 0;
    flex: 1;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
}

.swb-modal__title.point {
    padding-left: 14px;
    position: relative;
}

.swb-modal__title.point::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--bs-primary, rgb(251, 71, 75));
}

.swb-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: auto;
    border: 0;
    border-radius: var(--bs-border-radius-sm, 6px);
    background: var(--bs-tertiary-bg, rgb(49, 53, 65));
    color: var(--bs-body-color, rgb(165, 169, 180));
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.swb-modal__close:hover {
    background: var(--bs-dark, rgb(49, 53, 65));
    color: #fff;
}

.swb-modal__body {
    padding: 0 20px 20px;
}

.swb-modal__text {
    margin: 0 0 16px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--bs-body-color, rgb(165, 169, 180));
}

.swb-modal__label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.swb-modal__input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--bs-border-color, rgb(35, 39, 50));
    border-radius: var(--bs-border-radius, 8px);
    background: var(--bs-body-bg, rgb(27, 29, 36));
    color: #fff;
    font-size: 0.875rem;
    font-family: inherit;
    margin-bottom: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.swb-modal__input::placeholder {
    color: rgba(165, 169, 180, 0.65);
}

.swb-modal__input:focus {
    outline: none;
    border-color: var(--bs-primary, rgb(251, 71, 75));
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb, 251, 71, 75), 0.25);
}

.swb-modal__error {
    margin: 0 0 12px;
    font-size: 0.8125rem;
    color: var(--bs-danger, rgb(251, 71, 75));
}

.swb-modal__box--success .swb-modal__header {
    justify-content: center;
}

.swb-modal__success {
    margin: 4px 0 0;
    padding: 20px 16px;
    border-radius: var(--bs-border-radius, 8px);
    background: rgba(36, 227, 77, 0.08);
    border: 1px solid rgba(36, 227, 77, 0.25);
    text-align: center;
}

.swb-modal__success-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--bs-success, rgb(36, 227, 77));
    color: #0b1a10;
    font-size: 28px;
    font-weight: 700;
    line-height: 52px;
}

.swb-modal__success-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.swb-modal__success-text {
    margin: 0 0 10px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--bs-success, rgb(36, 227, 77));
}

.swb-modal__success-hint {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--bs-body-color, rgb(165, 169, 180));
}

.swb-modal__actions {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
    margin-top: 16px;
    width: 100%;
}

.swb-modal__btn {
    flex: 1 1 0;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    height: 44px;
    margin: 0 !important;
    padding: 0 16px !important;
    border: 0 !important;
    border-radius: var(--bs-border-radius, 8px) !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    line-height: 1 !important;
    vertical-align: middle;
    float: none !important;
    width: auto !important;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.swb-modal__btn--primary {
    background: var(--bs-primary, rgb(251, 71, 75)) !important;
    color: #fff !important;
}

.swb-modal__btn--primary:hover:not(:disabled) {
    background: rgb(182, 65, 68) !important;
    color: #fff !important;
}

.swb-modal__btn--ghost {
    background: var(--bs-tertiary-bg, rgb(49, 53, 65)) !important;
    color: #fff !important;
}

.swb-modal__btn--ghost:hover:not(:disabled) {
    background: rgb(57, 61, 74) !important;
    color: #fff !important;
}

.swb-modal__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.swb-modal__btn--loading:disabled {
    cursor: wait;
}

.swb-modal__btn--blocked:disabled {
    cursor: not-allowed;
}

.swb-gift {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10040;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 10px 12px;
    border: 0;
    border-radius: 999px;
    background: var(--bs-primary, rgb(251, 71, 75));
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--bs-body-font-family, Roboto, system-ui, sans-serif);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(251, 71, 75, 0.45), 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: swb-gift-bounce 2.2s ease-in-out infinite;
}

.swb-gift--visible,
.swb-gift:not([hidden]) {
    display: inline-flex;
}

.swb-gift:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 6px 20px rgba(251, 71, 75, 0.5), 0 12px 28px rgba(0, 0, 0, 0.3);
}

.swb-gift__icon {
    font-size: 22px;
    line-height: 1;
}

.swb-gift__label {
    white-space: nowrap;
}

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

@media (max-width: 480px) {
    .swb-gift {
        right: 14px;
        bottom: 14px;
        width: 52px;
        height: 52px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .swb-gift__label {
        display: none;
    }

    .swb-gift__icon {
        font-size: 26px;
    }

    .swb-modal__actions {
        flex-direction: column-reverse;
    }

    .swb-modal__header,
    .swb-modal__body {
        padding-left: 16px;
        padding-right: 16px;
    }
}
