/* Alert Confirm Modal — Phase 20 */

.acm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 30, 43, .75);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.acm-backdrop[hidden] {
    display: none;
}

.acm-dialog {
    background: #0d2b38;
    border: 1px solid rgba(0, 237, 100, .15);
    border-radius: 12px;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.acm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.125rem 1.25rem .875rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    flex-shrink: 0;
}

.acm-header h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.acm-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: .25rem;
    border-radius: 4px;
}

.acm-close:hover {
    color: #fff;
}

.acm-body {
    padding: 1rem 1.25rem;
    flex: 1;
}

.acm-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    padding: .625rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.acm-row:last-of-type {
    border-bottom: none;
}

.acm-row__label {
    font-size: .78rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .04em;
    flex-shrink: 0;
    padding-top: .1rem;
    min-width: 80px;
}

.acm-row__value {
    flex: 1;
    color: #e2e8f0;
    font-size: .9rem;
}

.acm-row__action {
    background: none;
    border: none;
    color: #00ed64;
    font-size: .82rem;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    text-decoration: underline;
    text-decoration-style: dotted;
}

/* Site type pills */
.acm-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
}

.acm-pill {
    background: none;
    border: 1px solid rgba(255,255,255,.2);
    color: #cbd5e1;
    font-size: .8rem;
    padding: .25rem .625rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

.acm-pill:hover {
    border-color: #0F6E56;
}

.acm-pill.active {
    background: #0F6E56;
    border-color: #0F6E56;
    color: #fff;
}

.acm-pill.locked {
    opacity: .5;
    cursor: not-allowed;
}

.acm-pill .acm-badge {
    font-size: .7rem;
    background: rgba(255,255,255,.15);
    padding: .05rem .3rem;
    border-radius: 3px;
    margin-left: .2rem;
}

/* Estimate strip */
.acm-estimate {
    margin: .75rem 0 .5rem;
    background: rgba(0, 104, 74, .15);
    border: 1px solid rgba(0, 237, 100, .2);
    border-radius: 8px;
    padding: .625rem .875rem;
    font-size: .83rem;
    color: #a7f3d0;
    min-height: 2.5rem;
}

.acm-estimate.is-loading {
    color: #64748b;
    font-style: italic;
}

.acm-estimate.is-error,
.acm-estimate.is-locked {
    background: rgba(239, 68, 68, .1);
    border-color: rgba(239, 68, 68, .3);
    color: #fca5a5;
}

/* Probability summary strip */
.acm-prob-summary {
    margin: -2px 0 .5rem;
    padding: .4rem .875rem;
    background: rgba(255,255,255,.04);
    border-left: 3px solid rgba(0,237,100,.35);
    border-radius: 0 4px 4px 0;
    font-size: .78rem;
    color: rgba(255,255,255,.6);
    line-height: 1.5;
}

/* All-open callout */
.acm-all-open {
    background: rgba(0, 104, 74, .2);
    border: 1px solid rgba(0, 237, 100, .3);
    border-radius: 8px;
    padding: .5rem .875rem;
    font-size: .82rem;
    color: #a7f3d0;
    margin-bottom: .5rem;
    display: none;
}

.acm-all-open.visible {
    display: block;
}

.acm-all-open a {
    color: #00ed64;
    text-decoration: underline;
    text-decoration-style: dotted;
}

/* Duplicate / error row */
.acm-inline-error {
    color: #fca5a5;
    font-size: .83rem;
    margin-top: .375rem;
    display: none;
}

.acm-inline-error.visible {
    display: block;
}

.acm-footer {
    padding: .875rem 1.25rem 1.125rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-shrink: 0;
}

.acm-footer .btn-primary-green {
    flex: 1;
}

.acm-customize-link {
    font-size: .82rem;
    color: #94a3b8;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.acm-customize-link:hover {
    color: #e2e8f0;
}

/* Toast */
.acm-toast {
    position: fixed;
    bottom: 5rem;
    right: 1.25rem;
    background: #0F6E56;
    color: #fff;
    padding: .75rem 1rem;
    border-radius: 8px;
    font-size: .88rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.4);
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: .5rem;
    max-width: 280px;
    transform: translateY(20px);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
}

.acm-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.acm-toast__dismiss {
    background: none;
    border: none;
    color: rgba(255,255,255,.7);
    cursor: pointer;
    padding: 0 0 0 .5rem;
    margin-left: auto;
    font-size: 1rem;
}

.acm-toast a {
    color: #a7f3d0;
    text-decoration: underline;
    text-decoration-style: dotted;
}

@media (max-width: 480px) {
    .acm-dialog {
        border-radius: 12px 12px 0 0;
        max-height: 85vh;
    }

    .acm-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .acm-footer {
        flex-wrap: wrap;
    }

    .acm-footer .btn-primary-green {
        order: -1;
        width: 100%;
    }
}
