/* SLZ7 - Melhorias: sidebar fixa, anexos, candidatar-se e lista de candidaturas.
   Carregado por ultimo: apenas complementa o visual existente. */

/* ---------- Sidebar da oportunidade (resumo + compartilhar juntos) ---------- */
@media (min-width: 993px) {
    .opp-single .opp-side {
        position: sticky;
        top: 90px;
        align-self: start;
        display: flex;
        flex-direction: column;
        gap: 16px;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }
    .opp-single .opp-side > * { flex: 0 0 auto; }
    .opp-single .opp-side .opp-box { position: static; top: auto; margin: 0; }
    .opp-single .opp-side .ed-share { margin: 0; }
}
.opp-single .opp-side .ed-share { z-index: 1; }

/* ---------- Anexos da oportunidade (painel da empresa) ---------- */
.slz7-files-field .slz7-file-chips { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.slz7-files-field .slz7-file-chips li {
    display: flex; align-items: center; gap: 10px; justify-content: space-between;
    background: #f6f7fb; border: 1px solid rgba(15, 17, 35, .08);
    border-radius: 10px; padding: 8px 12px; font-size: .88rem;
}
.slz7-files-field .slz7-file-chips a { font-weight: 700; text-decoration: none; }
.slz7-files-field .slz7-chip-remove {
    border: 0; background: transparent; cursor: pointer; color: #c2185b;
    font-size: .8rem; font-weight: 800; padding: 2px 6px; border-radius: 8px;
}
.slz7-files-field .slz7-chip-remove:hover { background: rgba(194, 24, 91, .1); }
.slz7-files-field li.is-removed { opacity: .45; text-decoration: line-through; }
.slz7-files-field .slz7-file-add { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.slz7-files-field.js-ready .slz7-file-remove { display: none; }
.slz7-files-field:not(.js-ready) .slz7-chip-remove[data-remove-saved] { display: none; }

/* ---------- Formulario de candidatura ---------- */
.slz7-apply-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    background: #f6f7fb; border: 1px solid rgba(15, 17, 35, .08);
    border-radius: 14px; padding: 18px 20px;
}
.slz7-apply-cta h3 { margin: 0 0 4px; font-size: 1.05rem; }
.slz7-apply-cta p { margin: 0; font-size: .88rem; opacity: .75; }
.slz7-apply-panel[hidden] { display: none; }
.slz7-apply-panel { margin-top: 16px; }
.slz7-apply-form .slz7-apply-file { display: grid; gap: 10px; }
.slz7-apply-form .slz7-apply-hint { font-size: .8rem; opacity: .7; margin: 2px 0 0; }
.slz7-apply-form .slz7-apply-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }

/* ---------- Lista de candidaturas recebidas ---------- */
.slz7-apps-toolbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; }
.slz7-apps-toolbar .slz7-apps-submit { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.slz7-apps-count { font-size: .85rem; opacity: .7; margin: 0 0 10px; }

.slz7-app-cards { display: grid; gap: 12px; }
.slz7-app-card {
    display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start;
    background: #fff; border: 1px solid rgba(15, 17, 35, .08); border-radius: 14px; padding: 14px 16px;
}
.slz7-app-card .slz7-app-who { display: flex; gap: 10px; align-items: flex-start; }
.slz7-app-card .slz7-app-name { font-weight: 800; }
.slz7-app-card .slz7-app-meta { font-size: .82rem; opacity: .72; display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.slz7-app-card .slz7-app-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.slz7-app-card .slz7-app-amount { font-weight: 800; white-space: nowrap; }

.slz7-app-modal[hidden] { display: none; }
.slz7-app-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background: rgba(15, 17, 35, .45);
}
.slz7-app-modal .slz7-app-modal-panel {
    background: #fff; width: min(620px, 100%); max-height: calc(100vh - 48px);
    overflow-y: auto; padding: 22px 24px 40px;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 17, 35, .35);
}
.slz7-app-modal-panel h3 { margin: 0 0 4px; }
.slz7-app-modal-close {
    border: 0; background: #f2f3f8; border-radius: 999px;
    width: 34px; height: 34px; min-width: 34px; padding: 0;
    flex: 0 0 auto; cursor: pointer; font-size: 1rem; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
}
.slz7-app-modal-close:hover { background: #e7e9f2; }
.slz7-app-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.slz7-app-modal-panel .slz7-app-dl { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 6px 14px; font-size: .9rem; margin: 0 0 16px; }
.slz7-app-modal-panel .slz7-app-dl dt { opacity: .65; }
.slz7-app-modal-panel .slz7-app-dl dd { margin: 0; font-weight: 700; }
.slz7-app-modal-panel .slz7-app-text { background: #f6f7fb; border-radius: 12px; padding: 12px 14px; margin: 0 0 12px; white-space: pre-line; font-size: .9rem; }
.slz7-app-modal-panel .slz7-decision-form { display: grid; gap: 10px; }

@media (max-width: 640px) {
    .slz7-app-modal { padding: 0; align-items: stretch; }
    .slz7-app-modal .slz7-app-modal-panel {
        width: 100%; height: 100%; max-height: 100%;
        border-radius: 0; box-shadow: none;
    }
    .slz7-app-card { grid-template-columns: 1fr; }
    .slz7-app-card .slz7-app-side { align-items: flex-start; }
}
