/**
 * استایل‌های فرانت‌اند پلاگین مدیریت پرداخت تلگرام
 */

.tpm-payment-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Tahoma', 'Arial', sans-serif;
    direction: rtl;
}

.tpm-payment-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.tpm-payment-header h2 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 24px;
}

.tpm-payment-header p {
    color: #7f8c8d;
    margin: 0;
    font-size: 14px;
}

.tpm-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tpm-message.tpm-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.tpm-message.tpm-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.tpm-message .tpm-icon {
    font-size: 18px;
}

.tpm-payment-form {
    margin-bottom: 30px;
}

.tpm-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.tpm-form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tpm-form-group.tpm-full-width {
    flex: 100%;
}

.tpm-form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
    font-size: 14px;
}

.tpm-form-group input,
.tpm-form-group textarea {
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.tpm-form-group input:focus,
.tpm-form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.tpm-form-group input:invalid {
    border-color: #e74c3c;
}

.tpm-help-text {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

.tpm-form-actions {
    text-align: center;
    margin: 30px 0;
}

.tpm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 200px;
}

.tpm-btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.tpm-btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.tpm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.tpm-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: tpm-spin 1s linear infinite;
}

.tpm-spinner-large {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: tpm-spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes tpm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tpm-payment-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.tpm-payment-info h3 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 16px;
}

.tpm-payment-info ul {
    margin: 0;
    padding-right: 20px;
    color: #555;
}

.tpm-payment-info li {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.tpm-payment-result {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}

.tpm-result-content h3 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.tpm-result-content p {
    color: #7f8c8d;
    margin: 0 0 20px 0;
    font-size: 14px;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .tpm-payment-container {
        margin: 10px;
        padding: 15px;
    }
    
    .tpm-form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .tpm-payment-header h2 {
        font-size: 20px;
    }
    
    .tpm-btn {
        width: 100%;
        min-width: auto;
    }
}

/* حالت تاریک */
@media (prefers-color-scheme: dark) {
    .tpm-payment-container {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .tpm-payment-header h2 {
        color: #ecf0f1;
    }
    
    .tpm-payment-header p {
        color: #bdc3c7;
    }
    
    .tpm-form-group label {
        color: #ecf0f1;
    }
    
    .tpm-form-group input,
    .tpm-form-group textarea {
        background: #34495e;
        border-color: #4a5f7a;
        color: #ecf0f1;
    }
    
    .tpm-form-group input:focus,
    .tpm-form-group textarea:focus {
        border-color: #3498db;
    }
    
    .tpm-payment-info {
        background: #34495e;
    }
    
    .tpm-payment-info h3 {
        color: #ecf0f1;
    }
    
    .tpm-payment-info li {
        color: #bdc3c7;
    }
    
    .tpm-payment-result {
        background: #34495e;
    }
    
    .tpm-result-content h3 {
        color: #ecf0f1;
    }
    
    .tpm-result-content p {
        color: #bdc3c7;
    }
}
