/**
 * Support Contacts - Frontend Styles
 * RTL-ready, responsive design matching the provided image
 */

/* ============================================
   Modal & Overlay
   ============================================ */

.support-contacts-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    pointer-events: none;
}

.support-contacts-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    z-index: 1;
    pointer-events: auto;
}

.support-contacts-modal-content {
	position: fixed;
	bottom: 100px;
	right: 30px;
	z-index: 999999;
	width: 100%;
	max-width: 600px;
	max-height: calc(100vh - 130px);
	overflow-y: auto;
	animation: modalSlideUp 0.3s ease-out;
	pointer-events: auto;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Custom scrollbar for modal */
.support-contacts-modal-content::-webkit-scrollbar {
    width: 8px;
}

.support-contacts-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.support-contacts-modal-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.support-contacts-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* ============================================
   Floating Action Button (FAB)
   ============================================ */

.support-contacts-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 15px;
    background-color: #1e3a5f;
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 999999;
}

.support-contacts-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.support-contacts-fab:active {
    transform: scale(0.95);
}

.support-contacts-fab.is-open {
    background-color: #e63946;
    transform: rotate(45deg);
}

.support-contacts-fab svg {
    width: 28px;
    height: 28px;
}

/* ============================================
   Container & Header
   ============================================ */

.support-contacts-container {
    background: #faf8f5;
    border-radius: 30px 30px 20px 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 30px;
    direction: rtl;
    text-align: right;
}

.support-contacts-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
}

.support-contacts-header-icon {
    color: #1e3a5f;
    flex-shrink: 0;
}

.support-contacts-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
}

/* ============================================
   Agent Cards List
   ============================================ */

.support-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.support-agent-card {
    background: #f5f2ed;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.support-agent-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* ============================================
   Avatar
   ============================================ */

.support-agent-avatar {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    background: #e0e0e0;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.support-agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   Agent Info
   ============================================ */

.support-agent-info {
    flex: 1;
    min-width: 0;
}

.support-agent-name-role {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.support-agent-name {
    font-size: 18px;
    font-weight: 700;
    color: #e63946;
    white-space: nowrap;
}

.support-agent-separator {
    color: #bbb;
    font-weight: 300;
}

.support-agent-role {
    font-size: 14px;
    color: #7a7a7a;
    font-weight: 400;
}

/* ============================================
   Action Buttons
   ============================================ */

.support-agent-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Phone Button */
.support-contacts-phone-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background-color: #2d8a8a;
    color: #ffffff;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    direction: ltr;
}

.support-contacts-phone-btn:hover {
    background-color: #256f6f;
    transform: scale(1.05);
}

.support-contacts-phone-btn:active {
    transform: scale(0.98);
}

.support-contacts-phone-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* WhatsApp Button */
.support-contacts-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: #25d366;
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.support-contacts-whatsapp:hover {
    background-color: #1da851;
    transform: scale(1.1);
}

.support-contacts-whatsapp:active {
    transform: scale(0.95);
}

.support-contacts-whatsapp svg {
    width: 24px;
    height: 24px;
}

/* Telegram Button */
.support-contacts-telegram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: #0088cc;
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.support-contacts-telegram:hover {
    background-color: #006699;
    transform: scale(1.1);
}

.support-contacts-telegram:active {
    transform: scale(0.95);
}

.support-contacts-telegram svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   No Agents Message
   ============================================ */

.support-contacts-no-agents {
    text-align: center;
    padding: 40px 20px;
    color: #7a7a7a;
    font-size: 16px;
}

/* ============================================
   Responsive Design
   ============================================ */

@media screen and (max-width: 768px) {
    .support-contacts-container {
        padding: 15px;
        border-radius: 20px 20px 15px 15px;
    }
    
    .support-contacts-title {
        font-size: 18px;
    }
    
    .support-agent-card {
        padding: 12px;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .support-agent-avatar {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }
    
    .support-agent-info {
        flex: 1;
        min-width: 0;
    }
    
    .support-agent-name-role {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .support-agent-separator {
        display: none;
    }
    
    .support-agent-name {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .support-agent-role {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .support-agent-actions {
        gap: 6px;
        flex-shrink: 0;
    }
    
    .support-contacts-phone-btn {
        padding: 8px 12px;
        font-size: 12px;
        gap: 6px;
    }
    
    .support-contacts-phone-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .support-contacts-phone-btn .phone-number {
        display: none;
    }
    
    .support-contacts-whatsapp,
    .support-contacts-telegram {
        width: 38px;
        height: 38px;
    }
    
    .support-contacts-whatsapp svg,
    .support-contacts-telegram svg {
        width: 20px;
        height: 20px;
    }
    
    .support-contacts-fab {
        width: 55px;
        height: 55px;
        bottom: 78px;
        right: 20px;
    }
    
    .support-contacts-modal-content {
        bottom: 85px;
        right: 20px;
        left: 20px;
        max-width: none;
        width: auto;
    }
}

@media screen and (max-width: 480px) {
    .support-agent-card {
        padding: 10px;
        gap: 6px;
    }
    
    .support-agent-avatar {
        width: 45px;
        height: 45px;
    }
    
    .support-agent-name {
        font-size: 13px;
    }
    
    .support-agent-role {
        font-size: 11px;
    }
    
    .support-contacts-phone-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .support-contacts-phone-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .support-agent-actions {
        gap: 5px;
    }
    
    .support-contacts-whatsapp,
    .support-contacts-telegram {
        width: 35px;
        height: 35px;
    }
    
    .support-contacts-whatsapp svg,
    .support-contacts-telegram svg {
        width: 18px;
        height: 18px;
    }
    
    .support-contacts-modal-content {
        bottom: 80px;
        right: 10px;
        left: 10px;
    }
    
    .support-contacts-fab {
        bottom: 78px;
        right: 15px;
    }
}

/* ============================================
   Accessibility
   ============================================ */

.support-contacts-fab:focus,
.support-contacts-phone-btn:focus,
.support-contacts-whatsapp:focus,
.support-contacts-telegram:focus {
    outline: 3px solid #4a90e2;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .support-contacts-fab,
    .support-agent-card,
    .support-contacts-phone-btn,
    .support-contacts-whatsapp,
    .support-contacts-telegram {
        transition: none;
    }
    
    .support-contacts-modal-content {
        animation: none;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .support-contacts-fab,
    .support-contacts-modal-overlay {
        display: none !important;
    }
    
    .support-contacts-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

