.custom-modal-first-div {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
    z-index: 99999;
    padding: 20px 16px;
    box-sizing: border-box;
}

.custom-modal-first-div.active {
    opacity: 1;
    pointer-events: auto;
}

.custom-modal-sec-div {
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0px 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
    transform: translateY(-8px) scale(0.98);
    transition: transform 160ms ease;
    box-sizing: border-box;
}

.custom-modal-first-div.active .custom-modal-sec-div {
    transform: none;
}

.custom-model-header {
    background: #73c97f;
    color: #ffffff;
    padding: 14px 18px;
    position: relative;
    flex-shrink: 0;
}

.custom-model-header.adminmodelheader {
    background: #000000;
}

.custom-model-header .custom-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    color: #ffffff;
    padding-right: 30px;
}

html[dir="rtl"] .custom-model-header .custom-modal-title,
body[dir="rtl"] .custom-model-header .custom-modal-title {
    padding-right: 0;
    padding-left: 30px;
}

.admin-model-popup-header {
    background: #73c97f;
    color: #ffffff;
    padding: 14px 18px;
    position: relative;
    flex-shrink: 0;
}

.admin-model-popup-header.admin-model-popup-header--admin {
    background: #000000;
}

.admin-model-popup-header .custom-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    color: #ffffff;
    padding-right: 30px;
}

html[dir="rtl"] .admin-model-popup-header .custom-modal-title,
body[dir="rtl"] .admin-model-popup-header .custom-modal-title {
    padding-right: 0;
    padding-left: 30px;
}

.custom-model-body {
    padding: 14px 18px 10px;
    color: #111827;
    font-size: 14px;
    line-height: 20px;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    max-height: calc(100vh - 180px);
    word-break: break-word;
    box-sizing: border-box;
}

.custom-model-body::-webkit-scrollbar {
    width: 6px;
}

.custom-model-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.custom-model-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.custom-model-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.custom-model-body p {
    margin: 0 0 6px 0;
}

.custom-model-body p:last-child {
    margin-bottom: 0;
}

.custom-model-body .wallet-add-form {
    margin: 0;
}

.custom-model-body .wallet-add-desc {
    margin: 0 0 10px 0;
    font-weight: 600;
}

.custom-model-body .wallet-add-label {
    margin: 0 0 8px 0;
    font-weight: 700;
    font-size: 18px;
    line-height: 24px;
}

.custom-model-body .wallet-add-input {
    height: 42px;
}

.custom-model-body .wallet-add-error {
    margin-top: 8px;
}

.custom-model-footer {
    padding: 8px 18px 10px;
    flex-shrink: 0;
}

.custom-model-footer .button-block {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    margin: 15px 0 5px 0;
}

.custom-modal-first-div .gen-btn,
.custom-modal-first-div .custom-modal-genbtn {
    min-width: 120px;
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    line-height: 18px;
    border: 1px solid transparent;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.custom-modal-first-div .modal_bg_btn {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
}

.custom-modal-first-div .modal_border_btn {
    background: #ffffff;
    border-color: #E2E8F0;
    color: #000000;
}

.custom-modal-first-div .gen-btn:hover,
.custom-modal-first-div .custom-modal-genbtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.icon__close {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    background: transparent;
    transition: transform 160ms ease;
    transform: translateY(-50%);
    z-index: 2;
}

.icon__close:hover {
    transform: translateY(-50%) scale(1.04);
}

.icon__close img {
    width: 23px;
    height: 23px;
    display: block;
}

html[dir="rtl"] .icon__close,
body[dir="rtl"] .icon__close {
    right: auto;
    left: 12px;
}
