/* ─── Condivide le basi con il form segnalazione ─────────────────────────── */

.bsb-avv-wrap *,
.bsb-avv-wrap *::before,
.bsb-avv-wrap *::after {
    box-sizing: border-box;
}

.bsb-avv-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    color: #1a1a1a;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 16px;
}

.bsb-avv-section {
    padding: 28px 0 20px;
    border-top: 1px solid #e0e0e0;
}

.bsb-avv-section:first-child {
    border-top: none;
    padding-top: 0;
}

.bsb-avv-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
}

.bsb-avv-section-desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 20px;
}

.bsb-avv-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.bsb-avv-field label {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.bsb-avv-field input,
.bsb-avv-field select,
.bsb-avv-field textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    color: #1a1a1a;
    background: #f7f7f7;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

.bsb-avv-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 36px;
    cursor: pointer;
}

.bsb-avv-field textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.bsb-avv-field input:focus,
.bsb-avv-field select:focus,
.bsb-avv-field textarea:focus {
    border-color: #1a1a1a;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26,26,26,0.07);
}

.bsb-avv-field input.bsb-avv-error,
.bsb-avv-field select.bsb-avv-error {
    border-color: #d0021b;
    background: #fff8f8;
}

.bsb-avv-field input::placeholder,
.bsb-avv-field textarea::placeholder {
    color: #aaa;
}

.bsb-avv-field .bsb-avv-error-msg {
    font-size: 12px;
    color: #d0021b;
    display: none;
}

.bsb-avv-field.has-error .bsb-avv-error-msg {
    display: block;
}

.bsb-avv-notice {
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
}

.bsb-avv-notice.visible { display: block; }

.bsb-avv-notice--success {
    background: #f0faf4;
    border: 1px solid #50c878;
    color: #1a6b3a;
}

.bsb-avv-notice--error {
    background: #fff8f8;
    border: 1px solid #d0021b;
    color: #a00015;
}

.bsb-avv-footer {
    padding: 28px 0 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.bsb-avv-submit-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #e8a000;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    letter-spacing: 0.01em;
}

.bsb-avv-submit-btn:hover:not(:disabled) { background: #cf8e00; }
.bsb-avv-submit-btn:active:not(:disabled) { transform: scale(0.98); }
.bsb-avv-submit-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.bsb-avv-submit-icon {
    font-size: 15px;
    line-height: 1;
}

.bsb-avv-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bsb-avv-spin 0.7s linear infinite;
}

.bsb-avv-submit-btn.loading .bsb-avv-spinner { display: inline-block; }

@keyframes bsb-avv-spin { to { transform: rotate(360deg); } }
