/**
 * Modale Rivendica / Nuovo studio — stile autonomo (il listing spesso non carica bootstrap.css).
 */

[id^="rivendicaAttivitaModal_"].modal,
[id^="inserisciAttivitaModal_"].modal {
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    padding: 1rem;
    box-sizing: border-box;
}

[id^="rivendicaAttivitaModal_"].modal.show,
[id^="inserisciAttivitaModal_"].modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
    height: auto !important;
    margin: 0 !important;
    border: 0 !important;
    background: rgba(13, 33, 70, 0.55);
    backdrop-filter: blur(2px);
}

[id^="rivendicaAttivitaModal_"] .modal-dialog,
[id^="inserisciAttivitaModal_"] .modal-dialog {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    pointer-events: none;
}

[id^="rivendicaAttivitaModal_"] .modal-content,
[id^="inserisciAttivitaModal_"] .modal-content {
    pointer-events: auto;
    background: #fff;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(13, 33, 70, 0.25);
    overflow: hidden;
}

[id^="rivendicaAttivitaModal_"] .modal-header,
[id^="inserisciAttivitaModal_"] .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #0d2146 0%, #1a3a6e 100%);
    color: #fff;
    border-bottom: 0;
}

[id^="rivendicaAttivitaModal_"] .modal-title,
[id^="inserisciAttivitaModal_"] .modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

[id^="rivendicaAttivitaModal_"] .btn-close,
[id^="inserisciAttivitaModal_"] .btn-close {
    filter: invert(1) grayscale(1);
    opacity: 0.85;
}

[id^="rivendicaAttivitaModal_"] .modal-body,
[id^="inserisciAttivitaModal_"] .modal-body {
    padding: 1.25rem 1.25rem 1.5rem;
}

.aa-claim-form .form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #0d2146;
    margin-bottom: 0.35rem;
}

.aa-claim-form .form-control {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #1e293b;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-sizing: border-box;
}

.aa-claim-form .form-control:focus {
    border-color: #0d2146;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(13, 33, 70, 0.12);
}

.aa-claim-form .form-control[readonly] {
    background: #f1f5f9;
}

.aa-claim-preflight {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.85rem 1rem;
}

.aa-claim-preflight .form-check {
    margin-bottom: 0.45rem;
    padding-left: 1.5rem;
}

.aa-claim-preflight .form-check-label {
    font-size: 0.9rem;
    line-height: 1.4;
}

.aa-claim-blocked.alert,
.aa-claim-orphan.alert {
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.aa-claim-form .btn-primary {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #0d2146;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.aa-claim-form .btn-primary:hover:not(:disabled) {
    background: #162d5c;
}

.aa-claim-form .btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

body.modal-open {
    overflow: hidden;
}

.aa-claim-result {
    text-align: center;
    padding: 0.5rem 0 0.25rem;
}

.aa-claim-result-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.aa-claim-result.is-approved .aa-claim-result-icon {
    background: #dcfce7;
    color: #166534;
}

.aa-claim-result.is-pending .aa-claim-result-icon {
    background: #fef3c7;
    color: #92400e;
}

.aa-claim-result.is-error .aa-claim-result-icon {
    background: #fee2e2;
    color: #991b1b;
}

.aa-claim-result-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0d2146;
    margin: 0 0 0.75rem;
}

.aa-claim-result-body {
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #334155;
    margin-bottom: 1rem;
}

.aa-claim-result-body p {
    margin: 0 0 0.65rem;
}

.aa-claim-feedback-banner {
    max-width: var(--mod-elenco-column-max, 1000px);
    margin: 0 auto 1.25rem;
    padding: 1rem 1.15rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.aa-claim-feedback-banner.is-ok {
    background: #f0fdf4;
    border-color: #86efac;
    color: #14532d;
}

.aa-claim-feedback-banner.is-err {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #7f1d1d;
}

.aa-claim-feedback-body {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Elenco: pulsante statico al posto di «Rivendica» */
.btn-azione.aa-claimed-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    cursor: default;
    background: #ecfdf5 !important;
    color: #0D2146 !important;
    border: 1px solid #86efac !important;
    font-size: 0.85rem;
    font-weight: 600;
    pointer-events: none;
}

/* Dettaglio scheda: badge testuale in hero */
.aa-claimed-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45em 0.85em;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #14532d;
    background: #ecfdf5;
    border: 1px solid #86efac;
    line-height: 1.2;
}

.aa-claimed-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
}

.aa-claimed-badge--hero {
    margin-bottom: 0.5rem;
}
