﻿/* ============================
     Bootstrap-like Modal CSS
============================ */
#myModal {
    direction: rtl;
    text-align: right;
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(3px);
    z-index: 1050;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 90000 !important;
}

    .modal.show {
        display: block;
    }

.modal-dialog {
    position: relative;
    margin: 50px auto;
    max-width: 600px;
    transition: transform .3s ease-out;
    transform: translateY(-20px);
    z-index:90000 !important;
}

.modal.show .modal-dialog {
    transform: translateY(0);
}

.modal-dialog-centered {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    width: auto;
}

.modal-dialog {
    max-width: 600px;
    width: 90%;
}

/* برای مودال بزرگ */
.modal-lg {
    max-width: 900px !important;
}

.modal-content {
    background-color: #fff;

    border-radius: .5rem;
    box-shadow: 0 0 30px rgba(0,0,0,0.2);
    animation: fadeIn .25s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(.97);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* header */
.modal-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
}

/* close button */
.btn-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    line-height: .5;
    cursor: pointer;
}

/* body */
.modal-body {
    padding: 1rem;
}

/* footer */
.modal-footer {
    padding: .75rem 1rem;
  
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
}
.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: .25em .25em;
    color: #000;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M2.146 2.146a.5.5 0 0 1 .708 0L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854a.5.5 0 0 1 0-.708z' fill='%23000'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: .25rem;
    opacity: .75;
    cursor: pointer;
}

    .btn-close:hover {
        opacity: 1;
    }

    .btn-close:focus {
        outline: none;
        box-shadow: 0 0 0 .25rem rgba(0,0,0,.25);
    }