/* استایل‌های اصلی پلاگین - کاملاً ریسپانسیو و بهینه */
.mrpay-form-container {
    max-width: 800px;
    margin: 40px auto;
    font-family: 'IRANSansXFaNum', 'Tahoma', 'Segoe UI', sans-serif;
    direction: rtl;
}

.mrpay-form {
    background: none !important;
    border: none !important;
    padding: 0;
    box-shadow: none !important;
}

/* بخش خوشامدگویی */
.mrpay-welcome-section {
    background: linear-gradient(135deg, #0278c6, #0268ad);
    color: white;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.mrpay-welcome-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1%, transparent 1%);
    background-size: 20px 20px;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-20px, -20px) rotate(360deg); }
}

.welcome-content h2 {
    margin: 0 0 15px 0;
    font-size: 32px;
    font-weight: bold;
    position: relative;
    z-index: 2;
}

.welcome-content p {
    margin: 0 0 25px 0;
    font-size: 18px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.requirements-list {
    background: rgba(255,255,255,0.1);
    padding: 25px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    z-index: 2;
}

.requirements-list h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
}

.requirements-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: right;
}

.requirements-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    padding-right: 25px;
}

.requirements-list li:last-child {
    border-bottom: none;
}

.requirements-list li::before {
    content: '✓';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* بخش‌های فرم */
.form-section {
    margin-bottom: 30px;
    padding: 30px;
    background: #fff;
    border-radius: 15px;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 25px 0;
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid #f7fafc;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2d3748;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-label::after {
    content: '*';
    color: #f56565;
    font-size: 18px;
    margin-right: 5px;
}

.mrpay-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
    font-family: 'IRANSansXFaNum', 'Tahoma', sans-serif;
    text-align: center;
}

.mrpay-input:focus {
    border-color: #0278c6;
    box-shadow: 0 0 0 3px rgba(2, 120, 198, 0.1);
    outline: none;
    transform: translateY(-1px);
}

.mrpay-input::placeholder {
    color: #a0aec0;
    text-align: center;
}

/* استایل‌های تاریخ تولد */
.dob-inputs-container {
    direction: ltr;
}

.dob-inputs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.input-group {
    position: relative;
    flex: 1;
}

.dob-field {
    text-align: center;
    padding: 15px 8px;
    font-size: 16px;
    font-weight: 600;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
}

.dob-field:focus {
    background: white;
    border-color: #0278c6;
}

.input-label {
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    color: #718096;
    font-weight: 500;
    background: white;
    padding: 2px 5px;
    border-radius: 4px;
}

.dob-separator {
    color: #cbd5e0;
    font-weight: bold;
    font-size: 18px;
    padding: 0 5px;
    display: flex;
    align-items: center;
}

/* راهنماهای فیلد */
.field-hint {
    font-size: 13px;
    color: #718096;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f7fafc;
    border-radius: 6px;
    border-right: 3px solid #0278c6;
}

/* آپلود فایل */
.file-upload-box {
    position: relative;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafafa;
    cursor: pointer;
}

.file-upload-box:hover, .file-upload-box.dragover {
    border-color: #0278c6;
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(2, 120, 198, 0.1);
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder {
    pointer-events: none;
}

.upload-icon {
    margin-bottom: 20px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.file-upload-box:hover .upload-icon {
    opacity: 1;
    transform: scale(1.1);
}

.upload-text strong {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
    font-size: 18px;
}

.upload-text span {
    display: block;
    color: #718096;
    font-size: 15px;
    margin-bottom: 8px;
}

.upload-text small {
    color: #a0aec0;
    font-size: 13px;
}

/* پیش‌نمایش تصاویر */
.preview-container {
    display: none;
    position: relative;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.preview-image {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    background: #f7fafc;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-container:hover .preview-overlay {
    opacity: 1;
}

.preview-remove {
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.preview-remove:hover {
    background: #c53030;
    transform: scale(1.1) rotate(90deg);
}

/* اسپینر و وضعیت آپلود */
.upload-spinner {
    display: none;
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0278c6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

.upload-success {
    display: none;
    color: #48bb78;
    font-weight: bold;
    margin: 15px 0;
    padding: 12px 20px;
    background: #f0fff4;
    border-radius: 8px;
    border: 1px solid #9ae6b4;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* دکمه ارسال و شرایط */
.form-actions {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    background: white;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.terms-agreement {
    margin-bottom: 25px;
    text-align: right;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
    color: #4a5568;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #0278c6;
    border-color: #0278c6;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-text a {
    color: #0278c6;
    text-decoration: none;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

.mrpay-submit-btn {
    background: linear-gradient(135deg, #0278c6, #0268ad);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 20px 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: not-allowed;
    transition: all 0.3s ease;
    opacity: 0.6;
    min-width: 280px;
    font-family: 'IRANSansXFaNum', 'Tahoma', sans-serif;
    box-shadow: 0 4px 15px rgba(2, 120, 198, 0.3);
    position: relative;
    overflow: hidden;
}

.mrpay-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.mrpay-submit-btn:not(:disabled) {
    opacity: 1;
    cursor: pointer;
}

.mrpay-submit-btn:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(2, 120, 198, 0.4);
}

.mrpay-submit-btn:not(:disabled):hover::before {
    left: 100%;
}

.btn-text, .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.form-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.form-footer p {
    margin: 0;
    color: #718096;
    font-size: 14px;
}

/* کارت‌های وضعیت */
.mrpay-status-card {
    max-width: 800px;
    margin: 40px auto;
    padding: 50px 40px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.mrpay-status-card.verified {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.mrpay-status-card.pending {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}

.mrpay-status-card.rejected {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.status-icon {
    margin-bottom: 25px;
}

.status-icon svg {
    stroke-width: 1.5;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.status-content h3 {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: bold;
}

.status-content p {
    margin: 0;
    opacity: 0.9;
    font-size: 18px;
    line-height: 1.6;
}

/* اطلاعات کاربر در وضعیت تایید شده */
.user-info-box {
    background: rgba(255,255,255,0.1);
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    opacity: 0.9;
}

.info-value {
    font-family: 'Courier New', monospace;
    background: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
}

/* دلیل رد درخواست */
.rejection-reason {
    background: rgba(255,255,255,0.15);
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    text-align: right;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.reason-header {
    margin-bottom: 15px;
}

.reason-header strong {
    font-size: 18px;
    opacity: 0.9;
}

.reason-content {
    line-height: 1.6;
    font-size: 16px;
    opacity: 0.9;
}

/* دکمه تلاش مجدد */
.retry-section {
    margin-top: 30px;
}

.mrpay-retry-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 15px 35px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.mrpay-retry-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,255,255,0.2);
}

/* پیام‌ها */
.mrpay-message {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.mrpay-message.success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.mrpay-message.error {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.mrpay-message.warning {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}

.message-icon {
    margin-bottom: 20px;
}

.message-icon svg {
    stroke-width: 1.5;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.message-content h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: bold;
}

.message-content p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
    line-height: 1.6;
}

.message-actions {
    margin-top: 25px;
}

.message-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.message-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* لاگین مورد نیاز */
.mrpay-login-required {
    max-width: 500px;
    margin: 60px auto;
    padding: 50px 40px;
    text-align: center;
    background: white;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.login-icon {
    margin-bottom: 25px;
    opacity: 0.7;
}

.mrpay-login-required h3 {
    margin: 0 0 15px 0;
    color: #2d3748;
    font-size: 24px;
}

.mrpay-login-required p {
    margin: 0 0 30px 0;
    color: #718096;
    font-size: 16px;
}

.mrpay-login-btn {
    display: inline-block;
    background: linear-gradient(135deg, #0278c6, #0268ad);
    color: white;
    padding: 15px 35px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(2, 120, 198, 0.3);
    font-family: 'IRANSansXFaNum', 'Tahoma', sans-serif;
}

.mrpay-login-btn:hover {
    background: linear-gradient(135deg, #0268ad, #025a9b);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(2, 120, 198, 0.4);
    color: white;
    text-decoration: none;
}

/* استایل خطا */
.field-error {
    border-color: #f56565 !important;
    box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1) !important;
    background: #fef5f5 !important;
}

.field-error-message {
    color: #f56565;
    font-size: 13px;
    margin-top: 8px;
    text-align: right;
    display: none;
    padding: 8px 12px;
    background: #fed7d7;
    border-radius: 6px;
    border-right: 3px solid #f56565;
    font-weight: 500;
}

/* لایت‌باکس برای تصاویر */
.mrpay-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.lightbox-tools {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    padding: 10px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.lightbox-tool {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-tool:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .mrpay-form-container {
        margin: 20px;
    }
    
    .form-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .mrpay-status-card {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .status-content h3 {
        font-size: 22px;
    }
    
    .mrpay-submit-btn {
        min-width: auto;
        width: 100%;
        padding: 18px 20px;
    }
    
    .dob-inputs {
        flex-direction: column;
        gap: 15px;
    }
    
    .dob-separator {
        display: none;
    }
    
    .input-label {
        position: static;
        text-align: center;
        margin-bottom: 8px;
        background: none;
        padding: 0;
    }
    
    .file-upload-box {
        padding: 30px 20px;
    }
    
    .upload-text strong {
        font-size: 16px;
    }
    
    .upload-text span {
        font-size: 14px;
    }
    
    .requirements-list {
        padding: 20px;
    }
    
    .welcome-content h2 {
        font-size: 24px;
    }
    
    .welcome-content p {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .info-item {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }
    
    .lightbox-tools {
        bottom: -80px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .mrpay-form-container {
        margin: 10px;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .mrpay-status-card {
        padding: 25px 15px;
    }
    
    .status-content h3 {
        font-size: 20px;
    }
    
    .mrpay-message {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .mrpay-login-required {
        padding: 30px 20px;
        margin: 20px;
    }
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateX(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

.mrpay-status-card,
.mrpay-form-container,
.mrpay-message,
.mrpay-login-required {
    animation: fadeIn 0.6s ease-out;
}

.form-section {
    animation: slideIn 0.6s ease-out;
}

.form-section:nth-child(even) {
    animation-delay: 0.1s;
}

.form-section:nth-child(odd) {
    animation-delay: 0.2s;
}

/* اسکرول بار سفارشی */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* هایلایت برای فیلدهای پر شده */
.mrpay-input:not(:placeholder-shown) {
    background: #f0fff4;
    border-color: #48bb78;
}

.mrpay-input:not(:placeholder-shown):focus {
    background: white;
}

/* وضعیت‌های مختلف برای دکمه */
.mrpay-submit-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.mrpay-submit-btn.loading {
    pointer-events: none;
}

/* افکت‌های ویژه برای تعامل */
.form-group:focus-within .form-label {
    color: #0278c6;
}

.file-upload-box.has-file {
    border-style: solid;
    border-color: #48bb78;
    background: #f0fff4;
}

/* نمایش وضعیت اعتبارسنجی */
.validation-status {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
}

.validation-status.valid {
    background: #48bb78;
    display: block;
}

.validation-status.invalid {
    background: #f56565;
    display: block;
}

.validation-status.valid::after {
    content: '✓';
    color: white;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.validation-status.invalid::after {
    content: '!';
    color: white;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
}