/* ═══════════════════════════════════════════════════════════
   تاجر تيك | TAJER TECH - WhatsApp Connection Page Styles
   ═══════════════════════════════════════════════════════════ */

.wa-connection-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px;
    animation: fadeInPage 0.4s ease-out;
}

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

/* بطاقة الربط الرئيسية */
.wa-card {
    background: rgba(30, 41, 59, 0.45);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

/* إضاءة خفيفة في زاوية الكارت تعطي لمسة جمالية */
.wa-card::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(37, 211, 102, 0.15) 0%, rgba(37, 211, 102, 0) 70%);
    pointer-events: none;
}

/* شريط الحالة الفاخر */
.wa-status-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 32px;
}

.wa-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    transition: all 0.3s;
}

.wa-status-badge.disconnected {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

.wa-status-badge.connecting {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #f59e0b;
    animation: wa-pulse-orange 1.5s infinite;
}

.wa-status-badge.connected {
    background: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(37, 211, 102, 0.25);
    color: #25d366;
    animation: wa-pulse-green 2s infinite;
}

@keyframes wa-pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.3); }
    70% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@keyframes wa-pulse-orange {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3); }
    70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* تقسيم المحتوى للـ QR والتعليمات */
.wa-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: center;
}

@media (max-width: 768px) {
    .wa-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* لوحة توليد الـ QR code */
.wa-qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.4);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 32px;
    min-height: 280px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
}

.wa-qr-box.connected-state {
    border-style: solid;
    border-color: rgba(37, 211, 102, 0.2);
    background: rgba(37, 211, 102, 0.02);
}

.wa-qr-image {
    width: 200px;
    height: 200px;
    background: white;
    padding: 10px;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    margin-bottom: 16px;
    animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* قائمة خطوات الربط */
.wa-steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wa-step-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.03);
}

.wa-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #075e54;
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wa-step-text {
    font-size: 0.88rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
}

/* أزرار الاتصال */
.wa-btn {
    background: #25d366;
    color: white;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 24px;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
    transition: all 0.3s;
}

.wa-btn:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.wa-btn:active {
    transform: translateY(0);
}

.wa-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    box-shadow: none;
}

.wa-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.wa-btn-red {
    background: #ef4444;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.wa-btn-red:hover {
    background: #dc2626;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* مؤشر الانتظار الدائري */
.wa-spinner {
    width: 40px;
    height: 40px;
    border: 3.5px solid rgba(255, 255, 255, 0.1);
    border-top-color: #25d366;
    border-radius: 50%;
    animation: wa-spin 1s linear infinite;
    margin-bottom: 16px;
}

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

/* بطاقة الملاحظات التحذيرية */
.wa-alert-card {
    border-right: 4px solid #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-top: 24px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
