/* Speaker Modal Styles - IUPMC 2025 */

/* Modal Overlay */
.speaker-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9998;
    animation: fadeIn 0.3s ease;
}

.speaker-modal-overlay.active {
    display: block;
}

/* Modal Container */
.speaker-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    overflow: hidden;
    animation: slideUp 0.4s ease;
}

.speaker-modal.active {
    display: block;
}

/* Modal Header */
.speaker-modal-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 2rem;
    position: relative;
}

.speaker-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.speaker-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.speaker-modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    padding-right: 3rem;
}

.speaker-modal-institution {
    font-size: 1.1rem;
    color: #fbbf24;
    font-weight: 500;
}

/* Modal Body */
.speaker-modal-body {
    padding: 2rem;
    max-height: calc(85vh - 150px);
    overflow-y: auto;
}

.speaker-modal-section {
    margin-bottom: 1.5rem;
}

.speaker-modal-section h3 {
    color: #1e3a8a;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.speaker-modal-section p {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.speaker-modal-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.speaker-modal-section ul li {
    color: #4b5563;
    padding: 0.5rem 0 0.5rem 1.5rem;
    position: relative;
    line-height: 1.6;
}

.speaker-modal-section ul li:before {
    content: "▸";
    color: #1e3a8a;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Scrollbar Styling */
.speaker-modal-body::-webkit-scrollbar {
    width: 8px;
}

.speaker-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.speaker-modal-body::-webkit-scrollbar-thumb {
    background: #1e3a8a;
    border-radius: 10px;
}

.speaker-modal-body::-webkit-scrollbar-thumb:hover {
    background: #1e40af;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .speaker-modal {
        width: 95%;
        max-height: 90vh;
    }

    .speaker-modal-header {
        padding: 1.5rem;
    }

    .speaker-modal-title {
        font-size: 1.4rem;
    }

    .speaker-modal-institution {
        font-size: 1rem;
    }

    .speaker-modal-body {
        padding: 1.5rem;
        max-height: calc(90vh - 120px);
    }

    .speaker-modal-section h3 {
        font-size: 1.1rem;
    }

    .speaker-modal-close {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .speaker-modal {
        width: 98%;
        max-height: 95vh;
        border-radius: 10px;
    }

    .speaker-modal-header {
        padding: 1.2rem;
    }

    .speaker-modal-title {
        font-size: 1.2rem;
    }

    .speaker-modal-institution {
        font-size: 0.95rem;
    }

    .speaker-modal-body {
        padding: 1.2rem;
        max-height: calc(95vh - 100px);
    }

    .speaker-modal-section {
        margin-bottom: 1.2rem;
    }

    .speaker-modal-section h3 {
        font-size: 1rem;
    }
}

/* RTL Support for Arabic */
html[dir="rtl"] .speaker-modal-close {
    right: auto;
    left: 1rem;
}

html[dir="rtl"] .speaker-modal-title {
    padding-right: 0;
    padding-left: 3rem;
}

html[dir="rtl"] .speaker-modal-section ul li {
    padding: 0.5rem 1.5rem 0.5rem 0;
}

html[dir="rtl"] .speaker-modal-section ul li:before {
    left: auto;
    right: 0;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}