/**
 * Simple Members Directory - Modal Styles
 * Version: 1.0.0
 */

/* Modal Container */
.smd-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    animation: smdFadeIn 0.3s ease-in-out;
}

.smd-modal.smd-active {
    display: block;
}

/* Modal Overlay */
.smd-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    cursor: pointer;
}

/* Modal Content Container */
.smd-modal-content {
    position: relative;
    background: #ffffff;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    margin: 5vh auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    animation: smdSlideUp 0.3s ease-in-out;
    z-index: 1000000;
}

/* Close Button */
.smd-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 36px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1000001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: Arial, sans-serif;
    font-weight: normal;
}

.smd-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

/* Modal Body */
.smd-modal-body {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

@media (min-width: 768px) {
    .smd-modal-body {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* Member Image */
.smd-member-image {
    flex-shrink: 0;
    text-align: center;
}

.smd-member-image img {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .smd-member-image {
        max-width: 250px;
    }
    
    .smd-member-image img {
        max-width: 100%;
    }
}

/* Member Info */
.smd-member-info {
    flex: 1;
}

.smd-member-name {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
}

.smd-member-bio {
    color: #555;
    font-size: 16px;
    line-height: 1.7;
}

.smd-member-bio p {
    margin: 0 0 15px 0;
}

.smd-member-bio p:last-child {
    margin-bottom: 0;
}

.smd-member-bio a {
    color: #0073aa;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.smd-member-bio a:hover {
    color: #005177;
}

.smd-member-bio ul,
.smd-member-bio ol {
    margin: 15px 0;
    padding-left: 25px;
}

.smd-member-bio li {
    margin-bottom: 8px;
}

/* Animations */
@keyframes smdFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Prevent body scroll when modal is open */
body.smd-modal-open {
    overflow: hidden;
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
    .smd-modal-content {
        width: 95%;
        margin: 2.5vh auto;
        max-height: 95vh;
        border-radius: 4px;
    }
    
    .smd-modal-body {
        padding: 30px 20px;
    }
    
    .smd-member-name {
        font-size: 24px;
    }
    
    .smd-member-bio {
        font-size: 15px;
    }
    
    .smd-modal-close {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}

/* Accessibility */
.smd-modal-close:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .smd-modal {
        display: none !important;
    }
}

/* Scrollbar styling for modal content */
.smd-modal-content::-webkit-scrollbar {
    width: 8px;
}

.smd-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.smd-modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.smd-modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}
