/* Dialog Base */
.govbr-institutional-popup {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    padding: 0;
    margin: auto;
    max-width: 90vw;
    width: 600px;
    max-height: 90vh;
    background: #ffffff;
    overflow: hidden; /* we manage inner scroll */
}

/* Fix for narrow mobile devices */
@media (max-width: 768px) {
    .govbr-institutional-popup {
        width: 95vw;
        border-radius: 8px;
    }
}

/* Backdrop */
.govbr-institutional-popup::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

/* Inner Container */
.govbr-popup-inner {
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Close Button */
.govbr-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.govbr-popup-close:hover,
.govbr-popup-close:focus {
    background: var(--portal-primary-hex, #1351B4);
    outline: none;
}
.govbr-popup-close:focus-visible {
    outline: 2px dashed #fff;
    outline-offset: 2px;
}

/* Text Content Mode */
.govbr-popup-text-content {
    padding: 3.5rem 2.5rem 2.5rem 2.5rem;
    text-align: center;
}

.govbr-popup-title {
    color: var(--portal-primary-hex, #1351B4);
    font-size: 1.75rem;
    font-weight: bold;
    margin-bottom: 1rem;
    margin-top: 0;
}

.govbr-popup-body {
    font-size: 1.1rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.govbr-popup-actions {
    display: flex;
    justify-content: center;
}

.govbr-popup-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--portal-primary-hex, #1351B4);
    color: #ffffff;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.govbr-popup-btn:hover {
    background: var(--portal-accent-hex, #0ea5e9);
    color: #ffffff;
}

/* Image Mode */
.govbr-popup-image-link {
    display: block;
    line-height: 0; /* remove bottom gap */
}

.govbr-popup-inner img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}
