/* DPS Custom Popup Modal Styles */

* {
    box-sizing: border-box;
}

/* Custom Modal Trigger Button - Position next to Chat Button */
.dps-custom-trigger {
    position: fixed;
    bottom: 25px;
    right: 85px; 
    width: 48px;
    height: 48px;
    background: var(--e-global-color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: -3px 55px 15px 0px rgba(0, 0, 0, 0.00), -2px 35px 14px 0px rgba(0, 0, 0, 0.02), -1px 20px 12px 0px rgba(0, 0, 0, 0.06), 0px 9px 9px 0px rgba(0, 0, 0, 0.10), 0px 2px 5px 0px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    z-index: 9997;
}

.dps-custom-trigger svg {
    width: 24px;
    height: 24px;
    fill: #FFF;
}

.dps-custom-trigger:hover {
    transform: scale(1.1);
    box-shadow: -3px 55px 15px 0px rgba(0, 0, 0, 0.10), -2px 35px 14px 0px rgba(0, 0, 0, 0.12), -1px 20px 12px 0px rgba(0, 0, 0, 0.14), 0px 9px 9px 0px rgba(0, 0, 0, 0.18), 0px 2px 5px 0px rgba(0, 0, 0, 0.15);
}

.custom-tooltip {
    position: absolute;
    right: 65px;
    color: var(--e-global-color-ed08105);
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    border-radius: 30px 0px 30px 30px;
    border: 1px solid rgba(154, 166, 178, 0.40);
    background: var(--White, #FFF);
    box-shadow: -3px 55px 15px 0px rgba(0, 0, 0, 0.00), -2px 35px 14px 0px rgba(0, 0, 0, 0.02), -1px 20px 12px 0px rgba(0, 0, 0, 0.06), 0px 9px 9px 0px rgba(0, 0, 0, 0.10), 0px 2px 5px 0px rgba(0, 0, 0, 0.12);
    display: flex;
    height: 48px;
    padding: 0px 20px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
    font-family: var(--e-global-typography-a779c3c-font-family), Sans-serif;
}

.dps-custom-trigger:hover .custom-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Custom Modal Container - Centered Large Modal */
.dps-custom-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90vw !important;
    max-width: 100%;
    height: 70vh;
    max-height: 800px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px 0 rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease forwards;
    opacity: 0;
}


.dps-custom-modal.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    animation: modalFadeIn 0.3s ease forwards;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Modal Overlay/Backdrop */
.dps-custom-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    animation: backdropFadeIn 0.3s ease forwards;
}

.dps-custom-modal-backdrop.active {
    display: block;
    animation: backdropFadeIn 0.3s ease forwards;
}

@keyframes backdropFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Header */
.dps-custom-modal-header {
    padding: 24px;
    background: linear-gradient(195deg, #D21C1E 0.59%, #6C0E0F 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #D71920;
    flex-shrink: 0;
}

.dps-custom-modal-header h2 {
    margin: 0;
    color: #fff;
    font-family: var(--e-global-typography-df30a5d-font-family), Sans-serif;
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    letter-spacing: -0.63px;
}

.dps-custom-modal-close {
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.dps-custom-modal-close:hover {
    transform: scale(1.1);
    background: #f5f5f5;
}

.dps-custom-modal-close svg {
    width: 24px;
    height: 24px;
}

.dps-custom-modal-close svg path {
    fill: #D71920;
}

/* Modal Body - Content Area */
.dps-custom-modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
}

/* Avatar Section */
.dps-custom-avatar-section {
    padding: 24px;
    background: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.dps-custom-avatar-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #D71920;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dps-custom-avatar-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 50%;
}

.dps-custom-avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.dps-custom-avatar-wrapper svg {
    width: 100%;
    height: 100%;
    fill: #D71920;
}

.dps-custom-avatar-info h3 {
    margin: 0 0 8px 0;
    color: #030303;
    font-family: var(--e-global-typography-df30a5d-font-family), Sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: normal;
}

.dps-custom-avatar-info p {
    margin: 0;
    color: #575757;
    font-family: Poppins, Sans-serif;
    font-size: 14px;
    font-weight: 300;
    line-height: 20px;
}

/* iFrame Container - Full Width */
.dps-custom-iframe-container {
    flex: 1;
    overflow: hidden;
    border-top: 1px solid #e0e0e0;
}

.dps-custom-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Content Area - For Text/HTML Content */
.dps-custom-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.dps-custom-content h3 {
    margin: 0 0 16px 0;
    color: #030303;
    font-family: var(--e-global-typography-df30a5d-font-family), Sans-serif;
    font-size: 20px;
    font-weight: 600;
}

.dps-custom-content p {
    color: #575757;
    font-family: Poppins, Sans-serif;
    font-size: 14px;
    font-weight: 300;
    line-height: 24px;
    margin: 0 0 16px 0;
}

.dps-custom-content a {
    color: #D71920;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dps-custom-content a:hover {
    text-decoration: underline;
    color: #B01814;
}

/* Modal Footer - Action Buttons */
.dps-custom-modal-footer {
    padding: 24px;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.dps-custom-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-family: Poppins, Sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dps-custom-btn-primary {
    background: #D71920;
    color: #fff;
}

.dps-custom-btn-primary:hover {
    background: #B01814;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(215, 25, 32, 0.3);
}

.dps-custom-btn-secondary {
    background: transparent;
    color: #D71920;
    border: 2px solid #D71920;
}

.dps-custom-btn-secondary:hover {
    background: #FFF5F5;
    border-color: #B01814;
}

/* Scrollbar Styling */
.dps-custom-content::-webkit-scrollbar,
.dps-custom-modal-body::-webkit-scrollbar {
    width: 6px;
}

.dps-custom-content::-webkit-scrollbar-track,
.dps-custom-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.dps-custom-content::-webkit-scrollbar-thumb {
    background: rgba(215, 25, 32, 0.3);
    border-radius: 3px;
}

.dps-custom-content::-webkit-scrollbar-thumb:hover {
    background: rgba(215, 25, 32, 0.5);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dps-custom-modal {
        width: 85vw;
        height: 75vh;
    }
}

@media (max-width: 768px) {
    .dps-custom-modal {
        width: 95vw;
        height: 85vh;
        max-width: 600px;
        max-height: 700px;
    }

    .dps-custom-trigger {
        bottom: 85px;
        right: 25px;
    }

    .dps-custom-modal-header h2 {
        font-size: 20px;
    }

    .dps-custom-modal-header {
        padding: 20px;
    }

    .dps-custom-avatar-section {
        padding: 20px;
    }

    .dps-custom-avatar-wrapper {
        width: 60px;
        height: 60px;
    }

    .dps-custom-avatar-info h3 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .dps-custom-modal {
        width: 100%;
        height: 100vh;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        bottom: 0;
        left: 0;
        right: 0;
        top: 0;
        transform: translate(0, 0);
    }

    .dps-custom-modal.active {
        transform: translate(0, 0);
    }

    @keyframes modalFadeIn {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .dps-custom-trigger {
        bottom: 85px;
        right: 15px;
        width: 44px;
        height: 44px;
    }

    .dps-custom-trigger svg {
        width: 20px;
        height: 20px;
    }

    .custom-tooltip {
        display: none;
    }

    .dps-custom-avatar-wrapper {
        width: 50px;
        height: 50px;
    }

    .dps-custom-modal-footer {
        flex-direction: column;
    }

    .dps-custom-btn {
        width: 100%;
        justify-content: center;
    }
}