/* Customer Panel Styles */
.mc-customer-panel {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f9fafb;
}

/* Credit Box */
.mc-credit-box {
    background: #4f46e5;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    color: #fff;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.mc-credit-box.mc-credit-active {
    background: #059669;
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.3);
}

.mc-credit-content {
    position: relative;
}

.mc-credit-label {
    font-size: 14px;
    opacity: 0.95;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.mc-credit-amount {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
}

.mc-credit-currency {
    font-size: 24px;
    margin-right: 5px;
}

.mc-credit-active-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.25);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.rtl .mc-credit-active-badge {
    left: auto;
    right: 15px;
}

.mc-activate-credit-btn {
    margin-top: 20px;
    padding: 12px 32px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mc-activate-credit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mc-activate-credit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Cards Grid */
.mc-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .mc-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

/* Wallet Auth */
.mc-wallet-auth {
    max-width: 520px;
    margin: 30px auto;
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.mc-wallet-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mc-wallet-tab {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mc-wallet-tab.active {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

.mc-wallet-field {
    margin-bottom: 15px;
}

.mc-wallet-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #111827;
}

.mc-wallet-field input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mc-wallet-field input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.mc-wallet-credit-status,
.mc-wallet-message {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
}

.mc-wallet-credit-status.success,
.mc-wallet-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.mc-wallet-credit-status.error,
.mc-wallet-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Wallet Checkout */
.mc-wallet-checkout-box {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
    background: #f9fafb;
}

.mc-wallet-checkout-box.mc-wallet-disabled {
    text-align: center;
    color: #6b7280;
}

.mc-wallet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.mc-wallet-title {
    font-weight: 700;
    color: #111827;
}

.mc-wallet-available {
    margin-bottom: 12px;
    color: #374151;
}

.mc-wallet-amount-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mc-wallet-amount-row input {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
}

.mc-wallet-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.mc-wallet-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mc-wallet-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.2s;
    border-radius: 999px;
}

.mc-wallet-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: 0.2s;
    border-radius: 50%;
}

.mc-wallet-switch input:checked + .mc-wallet-slider {
    background-color: #10b981;
}

.mc-wallet-switch input:checked + .mc-wallet-slider:before {
    transform: translateX(22px);
}

/* Wallet Account Card */
.mc-wallet-account-card {
    margin-top: 25px;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.mc-wallet-account-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.mc-wallet-account-amount {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.mc-wallet-account-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #6b7280;
    font-size: 13px;
}

@media (max-width: 768px) {
    .mc-wallet-amount-row {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .mc-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}

/* Card Item */
.mc-card-item {
    perspective: 1000px;
    height: 300px;
}

.mc-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.mc-card-item:hover .mc-card-inner {
    transform: rotateY(180deg);
}

/* جلوگیری از flip کارت‌ها وقتی اطلاعات تکمیل نشده */
.mc-card-item.mc-info-incomplete:hover .mc-card-inner {
    transform: none !important;
}

.mc-card-front,
.mc-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.mc-card-front {
    background: #fff;
    border: 1px solid #e5e7eb;
}

.mc-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mc-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #9ca3af;
}

.mc-card-placeholder .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
}

.mc-card-back {
    background: #4f46e5;
    color: #fff;
    transform: rotateY(180deg);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.mc-card-back h3 {
    margin: 0 0 15px 0;
    font-size: 22px;
    font-weight: 700;
}

.mc-card-back p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.95;
}

/* Modal Styles */
.mc-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    overflow-y: auto;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mc-modal-content {
    background-color: #fff;
    margin: 0;
    padding: 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: absolute;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid #e5e7eb;
    animation: slideDown 0.3s;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}



/* RTL Support */
.rtl .mc-modal-content {
    text-align: right;
    direction: rtl;
}

.mc-modal-close {
    color: #6b7280;
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.rtl .mc-modal-close {
    left: auto;
    right: 20px;
}

.mc-modal-close:hover {
    color: #111827;
}

.mc-modal-icon {
    text-align: center;
    margin-bottom: 20px;
}

.mc-modal-icon .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #ff9800;
}

.mc-modal-content h2 {
    text-align: center;
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #111827;
    font-weight: 700;
}

.mc-modal-content p {
    text-align: center;
    color: #4b5563;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Form Styles */
#mc-code-form,
#mc-submit-form {
    margin-top: 20px;
}

#mc-credit-code {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    margin-bottom: 15px;
    transition: all 0.3s;
    background: #fff;
}

#mc-credit-code:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.mc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .mc-form-row {
        grid-template-columns: 1fr;
    }
}

.mc-form-group {
    margin-bottom: 20px;
}

.mc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #111827;
}

.mc-form-group .required {
    color: #dc2626;
    font-weight: 700;
}

.mc-form-group input[type="text"],
.mc-form-group input[type="tel"],
.mc-form-group input[type="number"],
.mc-form-group textarea,
.mc-form-group input[type="file"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
    background: #fff;
}

.mc-form-group input:focus,
.mc-form-group textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.mc-form-group textarea {
    resize: vertical;
}

.mc-form-group small {
    display: block;
    margin-top: 5px;
    color: #4b5563;
    font-size: 12px;
    font-weight: 500;
}

.mc-form-group input.mc-field-error,
.mc-form-group textarea.mc-field-error,
.mc-form-group select.mc-field-error {
    border-color: #dc3232;
    box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.15);
}

.mc-field-error-message {
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    font-weight: 500;
}

/* Buttons */
.mc-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mc-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.mc-btn-primary {
    background: #4f46e5;
    color: #fff;
    width: 100%;
    border: none;
    font-weight: 600;
}

.mc-btn-primary:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.mc-btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.mc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messages */
#mc-code-message,
#mc-form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    display: none;
}

#mc-code-message.success,
#mc-form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    display: block;
}

#mc-code-message.error,
#mc-form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

/* Merchant Panel */
.mc-merchant-panel {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.mc-merchant-panel h1 {
    margin-bottom: 30px;
    color: #1f2937;
    font-weight: 700;
}

.mc-merchant-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.mc-tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 16px;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.3s;
}

.mc-tab-btn:hover {
    color: #111827;
    background: #f9fafb;
}

.mc-tab-btn.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    background: #f9fafb;
    font-weight: 700;
}

.mc-tab-content {
    display: none;
}

.mc-tab-content.active {
    display: block;
}

.mc-forms-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mc-form-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
}

.mc-form-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.mc-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.mc-form-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mc-form-info strong {
    font-size: 18px;
    color: #1f2937;
    font-weight: 700;
}

.mc-form-card {
    color: #4f46e5;
    font-size: 14px;
    font-weight: 600;
}

.mc-form-date {
    color: #9ca3af;
    font-size: 12px;
}

.mc-form-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mc-form-details {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #eee;
}

.mc-form-section {
    margin-bottom: 30px;
}

.mc-form-section h3 {
    margin-bottom: 20px;
    color: #1f2937;
    font-size: 18px;
    font-weight: 700;
}

.mc-form-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.mc-full-width {
    grid-column: 1 / -1;
}

.mc-checklist {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.mc-checklist label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.mc-checklist input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.mc-merchant-form .mc-form-status-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #eee;
    flex-wrap: wrap;
}

.mc-merchant-form .mc-form-status-controls select {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    background: #fff;
    transition: all 0.3s;
}

.mc-merchant-form .mc-form-status-controls select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* RTL Support */
.rtl .mc-form-row,
.rtl .mc-form-data-grid {
    direction: rtl;
}

.rtl .mc-merchant-tabs {
    direction: rtl;
}

/* Responsive */
@media (max-width: 768px) {
    .mc-customer-panel,
    .mc-merchant-panel {
        padding: 15px;
    }
    
    .mc-credit-amount {
        font-size: 36px;
    }
    
    .mc-modal-content {
        padding: 25px;
        width: 95%;
        max-width: 95%;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-height: 85vh;
    }
    
    .mc-modal-large .mc-modal-content {
        max-width: 95%;
    }
    
    .mc-form-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mc-merchant-form .mc-form-status-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mc-merchant-form .mc-form-status-controls select,
    .mc-merchant-form .mc-form-status-controls .mc-btn {
        width: 100%;
    }
}

/* Customer Info Form Styles */
.mc-alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-right: 4px solid;
}

.mc-alert-success {
    background: #d1fae5;
    color: #065f46;
    border-color: #059669;
}

.mc-alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

.mc-alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-color: #3b82f6;
}

.mc-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    background: #f9fafb;
    border-radius: 5px;
    margin-bottom: 20px;
}

.mc-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.mc-uploaded-image {
    margin-top: 10px;
}

.mc-uploaded-image img {
    border-radius: 5px;
    border: 2px solid #e5e7eb;
}

.mc-card-content {
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    margin: 20px 0;
    line-height: 1.8;
    color: #4b5563;
}

.mc-card-content-modal .mc-modal-content {
    max-width: 600px;
}

/* Checks Form Styles */
.mc-checks-form-container {
    margin: 20px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.mc-checks-form-container h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1f2937;
}

.mc-checks-list {
    margin-bottom: 15px;
}

.mc-check-item {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.mc-check-item h5 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #4f46e5;
    font-size: 16px;
}

.mc-check-item hr {
    margin: 20px 0 10px 0;
    border: none;
    border-top: 1px solid #e5e7eb;
}

.mc-add-check-btn,
.mc-remove-check-btn {
    margin-top: 10px;
}

.mc-remove-check-btn {
    background: #dc2626;
    color: white;
    border: none;
}

.mc-remove-check-btn:hover {
    background: #b91c1c;
}

/* Credit Assessment */
.mc-credit-check-tab .mc-credit-result-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.mc-credit-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

.mc-credit-result-card {
    display: grid;
    gap: 12px;
    background: #f9fafb;
    border-radius: 10px;
    padding: 18px;
    border: 1px solid #e5e7eb;
}

.mc-credit-result-rank {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mc-credit-rank-value {
    font-size: 22px;
    color: #4f46e5;
}

.mc-credit-group-title {
    font-weight: 700;
    color: #1f2937;
}

.mc-credit-group-desc {
    color: #4b5563;
    font-size: 13px;
}

.mc-credit-result-score,
.mc-credit-result-date {
    font-size: 13px;
    color: #374151;
}

.mc-credit-steps {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.mc-credit-step h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.mc-credit-otp-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.mc-credit-otp-actions .mc-btn-primary {
    width: auto;
}

.mc-credit-otp-actions .mc-btn-secondary {
    padding: 10px 18px;
}

.mc-credit-otp-timer {
    font-size: 12px;
    color: #6b7280;
}

.mc-credit-processing {
    display: grid;
    gap: 10px;
    align-items: center;
    justify-items: center;
    text-align: center;
}

.mc-credit-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 4px solid #e5e7eb;
    border-top-color: #4f46e5;
    animation: mc-spin 1s linear infinite;
}

@keyframes mc-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .mc-credit-result-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mc-credit-otp-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .mc-credit-otp-actions .mc-btn {
        width: 100%;
    }
}

