
/* POPUP BASE */
.popup {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(90vw, 700px);
    height: min(90vh, 700px);
    background-color: rgb(0 0 0 / 85%);
    z-index: 1000;
    border: 1pt solid black;
    box-shadow: 0 0 5px black;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* HEADER */
.popup-header {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgb(47 64 80);
    color: #fff;
    padding: 0.75rem 1rem;
}

.popup-title {
    margin: 0;
    font-size: 1.1rem;
}

.popup-close {
    font-size: 1.6rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.popup-close:hover {
    color: #f00;
}

/* BODY */
.popup-body {
    flex: 1;
    background: white;
    overflow: hidden;
    display: flex;
}

/* CONTAINER INTERNO */
.popup-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* FORM */
.popup-container form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.popup-container label {
    margin-top: 1rem;
}

/* TEXTAREA RESPONSIVA */
.area-message {
    width: 100%;
    max-width: 100%;
    min-height: 300px;
    box-sizing: border-box;
    resize: vertical;
}

.popup-container input,
.popup-container textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* BOTÃO */
.botao-enviar {
    margin-top: 1rem;
    align-self: flex-start;
}

/* TELA DE SUCESSO */
#success-screen {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    width: 100%;
    background: white;
}

#success-screen h1 {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
}

.success-screen-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* MOBILE */
@media (width <= 576px) {
    .popup {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    .popup-title {
        font-size: 1rem;
    }

    .botao-enviar {
        width: 100%;
    }

    .success-screen-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* Escopo restrito à section .credits */
.credits {
    --bg: #fff;
    --muted: #6b7280;
    --accent: #2b6cb0;
    --card: #f7fafc;
    --border: #e6edf3;

    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    color: #2b2b2b;
    padding: 20px;
    box-sizing: border-box;
    max-width: 960px;
    margin: 0 auto;
}

.credits h2 {
    font-size: 1.6rem;
    margin: 0 0 16px;
    color: var(--accent);
    letter-spacing: -0.2px;
}

.credits-section {
    background: linear-gradient(180deg, var(--card), #fff);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 2px 6px rgb(35 47 63 / 4%);
}

.credits-section h3 {
    font-size: 1rem;
    margin: 0 0 8px;
    color: #1f2937;
}

.credits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.credit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    transition: background .12s ease, transform .06s ease;
}

.credit-item:hover {
    background: rgb(43 108 176 / 4%);
    transform: translateY(-1px);
}

.credit-name {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    flex: 1 1 auto;
    word-break: break-word;
}

.credit-role {
    flex: 0 0 auto;
    font-size: 0.78rem;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgb(43 108 176 / 8%);
    color: var(--accent);
    border: 1px solid rgb(43 108 176 / 12%);
    white-space: nowrap;
}

/* small helper for very long names: show role on new line on narrow screens */
.credit-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}


.ack {
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.4;
}

/* Grid para desktop: 2 colunas, com colunas maiores para conteúdo principal */
@media (width >= 880px) {
    .credits-grid {
    grid-template-columns: 1fr 360px;
    align-items: start;
    }

    .credits-main {
    display: grid;
    gap: 12px;
    }
}

/* Dentro do painel direito (sponsors/uni/ack) */
.credits-side {
    display: grid;
    gap: 12px;
}

/* Mobile tweaks */
@media (width <= 479px) {
    .credits {
    padding: 14px;
    }

    .credits h2 {
    font-size: 1.3rem;
    }

    .credit-item {
    gap: 8px;
    padding: 10px;
    }

    .credit-role {
    font-size: 0.72rem;
    padding: 4px 6px;
    }
}