/**
 * EchoAI Memberships - الأنماط الرئيسية
 */

/* الأنماط العامة */
.echoai-membership-plans,
.echoai-membership-account,
.echoai-checkout-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
}

/* بطاقات الباقات */
.echoai-plan-card {
    transition: all 0.3s ease;
}

.echoai-plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.echoai-plan-button {
    transition: all 0.3s ease;
}

.echoai-plan-button:hover {
    transform: scale(1.05);
    text-decoration: none;
}

/* صفحة الحساب */
.subscription-info {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* أشرطة التقدم */
.usage-bar {
    transition: width 0.5s ease;
}

/* نموذج الدفع */
.payment-method-option {
    transition: all 0.3s ease;
    cursor: pointer;
}

.payment-method-option:hover {
    border-color: #3498db !important;
    background: #f0f8ff !important;
}

.payment-method-option input[type="radio"]:checked + div {
    color: #3498db;
}

/* زر الإرسال */
.echoai-submit-payment {
    transition: all 0.3s ease;
}

.echoai-submit-payment:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.echoai-submit-payment:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* الرسائل */
.echoai-message {
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

.echoai-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.echoai-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* التحميل */
.echoai-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* الاستجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    .echoai-membership-plans {
        grid-template-columns: 1fr !important;
    }
    
    .echoai-checkout-page > div {
        grid-template-columns: 1fr !important;
    }
    
    .subscription-info > div {
        grid-template-columns: 1fr !important;
    }
}

/* تحسينات الطباعة */
@media print {
    .echoai-plan-button,
    .echoai-cancel-subscription,
    .echoai-submit-payment {
        display: none;
    }
}

/* تحسينات إمكانية الوصول */
.echoai-plan-card:focus-within,
.payment-method-option:focus-within {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* الأيقونات */
.echoai-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    margin-left: 5px;
}

/* الجداول */
.echoai-table {
    width: 100%;
    border-collapse: collapse;
}

.echoai-table th,
.echoai-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
}

.echoai-table th {
    background: #f9f9f9;
    font-weight: bold;
}

.echoai-table tr:hover {
    background: #f5f5f5;
}

/* الشارات */
.echoai-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.echoai-badge.success {
    background: #27ae60;
    color: #fff;
}

.echoai-badge.warning {
    background: #f39c12;
    color: #fff;
}

.echoai-badge.danger {
    background: #e74c3c;
    color: #fff;
}

.echoai-badge.info {
    background: #3498db;
    color: #fff;
}

/* البطاقات */
.echoai-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px 0;
}

.echoai-card-header {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.echoai-card-body {
    padding: 15px 0;
}

.echoai-card-footer {
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    margin-top: 15px;
}
