/* Styles for Missionary Profile Templates */

.missionary-modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90vw; /* 90% of viewport width */
    min-width: 1600px; /* Minimum width for large displays */
    max-width: 95vw; /* Maximum width for smaller displays */
    aspect-ratio: 16/9;
    background: rgba(34, 44, 68, 0.85);
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    padding: 1rem 1rem 0;
    color: white;
    position: relative;
    overflow: hidden;
}

/* Tablet responsive styles (768px - 1024px) */
@media (max-width: 1024px) {
    .missionary-modal {
        min-width: unset;
        width: 95vw;
        max-width: 95vw;
        padding: 0.75rem 0.75rem 0;
        border-radius: 12px;
    }
}

/* Phone responsive styles (max 768px) */
@media (max-width: 768px) {
    .missionary-modal {
        min-width: unset;
        width: 98vw;
        max-width: 98vw;
        aspect-ratio: unset;
        max-height: 95vh;
        padding: 0.5rem 0.5rem 0;
        border-radius: 8px;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 2rem;
    flex-shrink: 0; /* Prevent header from shrinking */
}

.modal-title {
    font-size: 3rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

@media (max-width: 1024px) {
    .modal-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .modal-title {
        font-size: 1.25rem;
    }
}

.button-container {
    display: flex;
    gap: 1rem;
}

@media (max-width: 768px) {
    .button-container {
        gap: 0.5rem;
    }
}

.profile-content-wrapper {
    flex: 1;
    width: 100%;
    overflow: hidden; /* Hide overflow */
}

.profile-content {
    display: flex;
    width: 100%;
    gap: 4rem;
    overflow-y: auto; /* Make content scrollable */
    height: 100%;
    padding-right: 10px; /* Add padding for scrollbar */
}

@media (max-width: 1024px) {
    .profile-content {
        gap: 2rem;
        padding-right: 5px;
    }
}

@media (max-width: 768px) {
    .profile-content {
        flex-direction: column;
        gap: 1rem;
        padding-right: 5px;
    }
}

.profile-content-vertical {
    flex-direction: column;
}

.profile-left-column {
    flex: 1 1 47%;
    min-width: 0;
    padding: 0 1.5rem 0 1rem;
    vertical-align: top;
    box-sizing: border-box;
}

.profile-right-column {
    flex: 1 1 53%;
    min-width: 0;
    padding: 0 1rem 0 1rem;
    vertical-align: top;
    box-sizing: border-box;
}


.profile-image-container {
    text-align: center;
    margin: 0 0 2rem 0;
    position: relative;
}

.profile-image-centered {
    align-self: center;
}

.profile-image {
    max-width: 100%;
    max-height: 300px;
    min-height: 300px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

@media (max-width: 1024px) {
    .profile-image {
        max-height: 200px;
        min-height: 200px;
    }
}

@media (max-width: 768px) {
    .profile-image {
        max-height: 150px;
        min-height: 150px;
    }
}

.image-error {
    color: #ff6b6b;
    display: none;
    margin-top: 10px;
    font-size: 1.2rem;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    border: 3px dashed #4dabf7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4dabf7;
    background-color: rgba(77, 171, 247, 0.1);
}

.profile-section {
    width: 100%;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;

}

.section-header {
    font-size: 1.4rem;
    font-weight: 600;
    color: #4dabf7;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0.5rem;
}

@media (max-width: 1024px) {
    .section-header {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.35rem;
    }
}

@media (max-width: 768px) {
    .section-header {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.25rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    }
}

.section-content {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 1024px) {
    .section-content {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .section-content {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }
}

.bio-content {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .bio-content {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .bio-content {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }
}

/* Contact Information Section */
.contact-section {
    margin-top: 1.5rem;
    width: 100%;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 0.5rem;
}

@media (max-width: 1024px) {
    .contact-links {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .contact-links {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.contact-item {
    padding: 0.8rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-content {
    flex: 1;
    min-width: 0; /* Allows text truncation to work */
}

.contact-label {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.2rem;
}

@media (max-width: 768px) {
    .contact-label {
        font-size: 0.7rem;
    }
}

.contact-link {
    color: #4dabf7;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
    pointer-events: none;
}

/* QR Code Styling */
.qr-border {
    border: 2px solid #fff;
    border-radius: 8px;
    padding: 4px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    box-sizing: border-box; /* from qr-border.css and missionary-profile.css */
    display: flex;         /* from missionary-profile.css, !important removed */
    width: 55px;           /* from missionary-profile.css, !important removed */
    height: 55px;          /* from missionary-profile.css, !important removed */
    align-items: center;   /* from missionary-profile.css */
    justify-content: center; /* from missionary-profile.css */
}

@media (max-width: 1024px) {
    .qr-border {
        width: 45px;
        height: 45px;
        padding: 3px;
    }
}

@media (max-width: 768px) {
    .qr-border {
        width: 35px;
        height: 35px;
        padding: 2px;
    }
}

/* Ensure QR code image fills its container */
.qr-border img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.text-center {
    text-align: center;
}

/* Separator style */
hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 1.5rem 0;
}

/* Footer styles */
.modal-footer {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, .7);
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

@media (max-width: 1024px) {
    .modal-footer {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 768px) {
    .modal-footer {
        padding: 0.5rem 0.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }
}

.footer-left {
    display: flex;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 4rem;
}

@media (max-width: 1024px) {
    .footer-links {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .footer-links {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
}

.footer-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #4dabf7;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.0rem;
    cursor: pointer;
    padding: 0.5rem 1.2rem;
    margin: 0 0.5rem;
    transition: all 0.2s ease;
    border-radius: 6px;
    text-decoration: none;
    min-width: 120px;
    text-align: center;
}

@media (max-width: 1024px) {
    .footer-button {
        font-size: 0.9rem;
        padding: 0.4rem 1rem;
        min-width: 100px;
        margin: 0 0.25rem;
    }
}

@media (max-width: 768px) {
    .footer-button {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
        min-width: 70px;
        margin: 0 0.15rem;
    }
}

.footer-button:hover {
    background: rgba(77, 171, 247, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.footer-button.active {
    background: rgba(77, 171, 247, 0.4);
    border-color: #74c0fc;
    color: white;
    font-weight: 600;
    box-shadow: 0 0 8px rgba(77, 171, 247, 0.5);
}

.footer-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .footer-actions {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .footer-actions {
        gap: 0.5rem;
    }
}
