@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/font-face.css');

:root {
    --baran-modal-primary: #4A90A4;
    --baran-modal-secondary: #2C3E50;
    --baran-modal-accent: #E74C3C;
    --baran-modal-bg: #FFFFFF;
    --baran-modal-text: #2C3E50;
    --baran-modal-shadow: rgba(44, 62, 80, 0.3);
}

.baran-pl-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    font-family: 'Vazir', Tahoma, sans-serif;
    direction: rtl;
    animation: baran-modal-fadeIn 0.3s ease-out;
}

.baran-pl-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes baran-modal-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.baran-pl-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: baran-modal-backdrop 0.3s ease-out;
}

@keyframes baran-modal-backdrop {
    from {
        backdrop-filter: blur(0);
    }
    to {
        backdrop-filter: blur(5px);
    }
}

.baran-pl-modal-content {
    position: relative;
    width: 90%;
    max-width: 480px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: baran-modal-slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: perspective(1000px) rotateX(0deg) scale(1);
}

@keyframes baran-modal-slideIn {
    from {
        opacity: 0;
        transform: perspective(1000px) rotateX(-10deg) scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: perspective(1000px) rotateX(0deg) scale(1) translateY(0);
    }
}

.baran-pl-modal-content:hover {
    transform: perspective(1000px) rotateX(1deg) scale(1.01);
    box-shadow: 
        0 30px 70px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.15);
}

.baran-pl-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 25px;
    background: linear-gradient(135deg, var(--baran-modal-primary), var(--baran-modal-secondary));
    position: relative;
    overflow: hidden;
}

.baran-pl-modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.15) 0%,
        transparent 50%
    );
    animation: baran-modal-shine 4s ease-in-out infinite;
}

@keyframes baran-modal-shine {
    0%, 100% {
        transform: translateX(-30%) translateY(-30%);
    }
    50% {
        transform: translateX(30%) translateY(30%);
    }
}

.baran-pl-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.baran-pl-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    font-size: 20px;
    color: #FFFFFF;
    border: none;
}

.baran-pl-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.baran-pl-modal-body {
    padding: 30px 25px;
    text-align: center;
    background: var(--baran-modal-bg);
}

.baran-pl-modal-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #FFF3CD, #FFEAA7);
    border-radius: 50%;
    box-shadow: 
        0 10px 30px rgba(243, 156, 18, 0.3),
        inset 0 -5px 15px rgba(0, 0, 0, 0.05);
    animation: baran-modal-icon-pulse 2s ease-in-out infinite;
}

@keyframes baran-modal-icon-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 10px 30px rgba(243, 156, 18, 0.3),
            inset 0 -5px 15px rgba(0, 0, 0, 0.05);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 
            0 15px 40px rgba(243, 156, 18, 0.4),
            inset 0 -5px 15px rgba(0, 0, 0, 0.05);
    }
}

.baran-pl-modal-icon .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: #F39C12;
}

.baran-pl-modal-message {
    font-size: 16px;
    font-weight: 600;
    color: var(--baran-modal-text);
    margin: 0 0 12px;
    line-height: 1.7;
}

.baran-pl-modal-submessage {
    font-size: 14px;
    color: #7F8C8D;
    margin: 0;
    line-height: 1.6;
}

.baran-pl-modal-footer {
    padding: 20px 25px 25px;
    text-align: center;
    background: linear-gradient(to bottom, rgba(245, 247, 250, 0.5), transparent);
}

.baran-pl-modal-btn {
    padding: 14px 45px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Vazir', Tahoma, sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 20px rgba(74, 144, 164, 0.35);
    position: relative;
    overflow: hidden;
}

.baran-pl-modal-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.baran-pl-modal-btn:hover::before {
    transform: translateX(100%);
}

.baran-pl-modal-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(74, 144, 164, 0.45);
}

.baran-pl-modal-btn:active {
    transform: translateY(-1px) scale(0.98);
}

@media (max-width: 480px) {
    .baran-pl-modal-content {
        width: 95%;
        max-width: none;
        margin: 15px;
    }
    
    .baran-pl-modal-header {
        padding: 18px 20px;
    }
    
    .baran-pl-modal-body {
        padding: 25px 20px;
    }
    
    .baran-pl-modal-icon {
        width: 60px;
        height: 60px;
    }
    
    .baran-pl-modal-icon .dashicons {
        font-size: 30px;
        width: 30px;
        height: 30px;
    }
    
    .baran-pl-modal-title {
        font-size: 16px;
    }
    
    .baran-pl-modal-message {
        font-size: 15px;
    }
    
    .baran-pl-modal-btn {
        width: 100%;
        padding: 16px;
    }
}

@media (min-width: 768px) {
    .baran-pl-modal-content {
        max-width: 520px;
    }
}

@media (min-width: 1024px) {
    .baran-pl-modal-content {
        max-width: 560px;
    }
}
