/* Portfolio edit modal — shared by companies and community pages */

#communityCompanyPortfolioModal .modal-body {
    position: relative;
}

#communityCompanyPortfolioModal .modal-header .modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 auto;
    min-width: 0;
}

#communityCompanyPortfolioModal .modal-header .modal-title {
    flex: 0 1 auto;
    min-width: 0;
}

#communityCompanyPortfolioModal .community-company-portfolio-modal-company-host {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}

#communityCompanyPortfolioModal .community-company-portfolio-status {
    display: none !important;
}

#communityCompanyPortfolioModal .community-company-portfolio-modal-company-host .companies-quote-company-logo {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 0.55rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#communityCompanyPortfolioModal .community-company-portfolio-modal-company-host .companies-quote-company-logo img,
#communityCompanyPortfolioModal .community-company-portfolio-modal-company-host .company-map-marker-shell img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
    display: block;
}

#communityCompanyPortfolioModal .community-company-portfolio-modal-company-host .company-map-marker-shell {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

#communityCompanyPortfolioModal .company-map-marker-confidence {
    position: absolute;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.2rem;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--confidence-color, #94a3b8);
    color: #fff;
    font-size: 0.62rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.28);
    cursor: pointer;
}

#communityCompanyPortfolioModal .company-map-marker-confidence--bottom-right {
    right: -4px;
    bottom: -4px;
    left: auto;
    top: auto;
}

#communityCompanyPortfolioModal .company-map-marker-confidence--bottom-left {
    left: -4px;
    bottom: -4px;
    right: auto;
    top: auto;
}

#communityCompanyPortfolioModal .company-map-marker-confidence strong {
    font-weight: 800;
}

#communityCompanyPortfolioModal .companies-quote-upload-zone {
    border: 2px dashed rgba(13, 110, 253, 0.35);
    border-radius: 0.65rem;
    background: rgba(13, 110, 253, 0.04);
    padding: 0.85rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    margin-top: 0.15rem;
}

#communityCompanyPortfolioModal .companies-quote-upload-zone:hover,
#communityCompanyPortfolioModal .companies-quote-upload-zone.is-dragover {
    border-color: rgba(13, 110, 253, 0.75);
    background: rgba(13, 110, 253, 0.08);
}

#communityCompanyPortfolioModal .companies-quote-upload-icon {
    color: #0d6efd;
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
}

#communityCompanyPortfolioModal .companies-quote-upload-text {
    font-size: 0.82rem;
    color: #475569;
}

#communityCompanyPortfolioModal .companies-quote-images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.55rem;
}

#communityCompanyPortfolioModal .companies-quote-image-thumb-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 0.45rem;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #f8fafc;
    flex-shrink: 0;
}

#communityCompanyPortfolioModal .companies-quote-image-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#communityCompanyPortfolioModal .companies-quote-image-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 0.65rem;
    line-height: 1;
    padding: 0;
}

#communityCompanyPortfolioModal .community-company-portfolio-panels-fields {
    max-width: 24rem;
}

#communityCompanyPortfolioModal .community-company-portfolio-title-row .community-company-portfolio-year-col {
    width: 11rem;
    min-width: 11rem;
    flex: 0 0 auto;
}

#communityCompanyPortfolioModal .community-company-portfolio-title-row .community-company-portfolio-year-col .form-label {
    white-space: nowrap;
}

#communityCompanyPortfolioModal .community-company-portfolio-title-row .community-company-portfolio-year-col .form-control {
    padding-left: 0.45rem;
    padding-right: 0.45rem;
}

#communityCompanyPortfolioModal .community-company-portfolio-description-field {
    resize: none;
    overflow-y: hidden;
    min-height: 2.5rem;
}

#communityCompanyPortfolioModal .community-company-portfolio-description-field.is-scrollable {
    overflow-y: auto;
}

#communityCompanyPortfolioModal .community-company-portfolio-status {
    padding: 0.55rem 0.75rem;
    border-radius: 0.45rem;
    font-size: 0.9rem;
    margin-bottom: 0.85rem;
}

#communityCompanyPortfolioModal .community-company-portfolio-status.is-success {
    background: rgba(25, 135, 84, 0.12);
    color: #146c43;
    border: 1px solid rgba(25, 135, 84, 0.25);
}

#communityCompanyPortfolioModal .community-company-portfolio-status.is-error {
    background: rgba(220, 53, 69, 0.1);
    color: #b02a37;
    border: 1px solid rgba(220, 53, 69, 0.22);
}

#communityCompanyPortfolioModal .form-label-optional {
    font-size: 0.78rem;
    font-weight: 400;
    color: #94a3b8;
    margin-left: 0.35rem;
}

#communityCompanyPortfolioModal .form-label-optional::before {
    content: "(";
}

#communityCompanyPortfolioModal .form-label-optional::after {
    content: ")";
}
