/* Modal Overlay */
.pbg-bio-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    overflow-y: auto;
    padding: 20px;
}

.pbg-bio-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Container */
.pbg-bio-modal {
    background: #fff;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin: auto;
}

/* Close Button */
.pbg-bio-modal-close {
    position: sticky;
    top: 20px;
    float: right;
    width: 40px;
    height: 40px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    margin: 20px 20px 0 0;
}

.pbg-bio-modal-close:hover {
    background: #000;
}

/* Modal Content */
.pbg-bio-modal-body {
    padding: 20px 40px 40px;
    clear: both;
}

/* Override DIVI section padding for modal */
.pbg-bio-modal-body .et_pb_section {
    padding: 20px 0 !important;
}

.pbg-bio-modal-body .et_pb_row {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 0 !important;
}

.pbg-bio-modal-body .et_pb_column {
    margin-bottom: 0 !important;
}

/* Ensure text is readable */
.pbg-bio-modal-body .et_pb_text {
    line-height: 1.6;
}

/* Style the bio name */
.pbg-bio-modal-body .team_name {
    font-size: 32px !important;
    font-weight: 600;
    margin-bottom: 5px !important;
}

.pbg-bio-modal-body .team_position {
    font-size: 18px !important;
    margin-bottom: 20px !important;
}

/* Style the vertical rule */
.pbg-bio-modal-body .bio__row-2 {
    height: 2px;
    margin: 20px 0 !important;
}

/* Loading State */
.pbg-bio-modal-loading {
    text-align: center;
    padding: 60px 40px;
    font-size: 18px;
    color: #666;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .pbg-bio-modal {
        max-height: 95vh;
        margin: 10px;
        border-radius: 4px;
    }
    
    .pbg-bio-modal-body {
        padding: 20px;
    }
    
    .pbg-bio-modal-close {
        top: 10px;
        margin: 10px 10px 0 0;
    }
}

/* Ensure any background colors work */
.pbg-bio-modal-body [class*="gcid-"] {
    /* DIVI global color classes will work */
}