/*
 * CPBesana — Form Segnalazione Errori
 */

/* ── Wrapper ── */
.cpb-segn-wrap {
    max-width: 680px;
    margin: 0 auto;
    font-family: inherit;
}

/* ── Header ── */
.cpb-segn-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 2px solid #fee2e2;
}
.cpb-segn-icon {
    font-size: 36px !important;
    width: 36px !important;
    height: 36px !important;
    color: #c0392b;
    flex-shrink: 0;
    margin-top: 2px;
}
.cpb-segn-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1B4A8A;
    margin: 0 0 4px;
    line-height: 1.2;
}
.cpb-segn-subtitle {
    font-size: .9rem;
    color: #4b5563;
    margin: 0;
    line-height: 1.5;
}

/* ── Notice (success / error) ── */
.cpb-segn-notice {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .9rem;
    margin-bottom: 20px;
    border-left: 4px solid transparent;
    line-height: 1.5;
}
.cpb-segn-notice[hidden] { display: none; }
.cpb-segn-notice--success {
    background: #f0fdf4;
    border-color: #16a34a;
    color: #15803d;
}
.cpb-segn-notice--error {
    background: #fef2f2;
    border-color: #dc2626;
    color: #b91c1c;
}

/* ── Form ── */
.cpb-segn-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Riga a 2 colonne */
.cpb-segn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 520px) {
    .cpb-segn-row { grid-template-columns: 1fr; }
}

/* Campo singolo */
.cpb-segn-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.cpb-segn-field label {
    font-size: .8rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.cpb-segn-field input,
.cpb-segn-field select,
.cpb-segn-field textarea {
    padding: 9px 13px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font-size: .9rem;
    font-family: inherit;
    color: #111827;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    resize: vertical;
    -webkit-appearance: none;
    appearance: none;
}
.cpb-segn-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='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}
.cpb-segn-field input:focus,
.cpb-segn-field select:focus,
.cpb-segn-field textarea:focus {
    outline: none;
    border-color: #1B4A8A;
    box-shadow: 0 0 0 3px rgba(27, 74, 138, .14);
}
.cpb-segn-hint {
    font-size: .75rem;
    color: #9ca3af;
    font-style: italic;
}

/* ── CAPTCHA ── */
.cpb-segn-captcha {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    background: #f0f5ff;
    border: 1px solid #c7d7f0;
    border-radius: 8px;
    padding: 12px 16px;
}
.cpb-segn-captcha__label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .875rem;
    color: #374151;
    flex: 1;
    min-width: 180px;
}
.cpb-segn-captcha__label .dashicons {
    color: #1B4A8A;
    font-size: 18px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.cpb-segn-captcha__label strong {
    color: #1B4A8A;
    font-size: 1.05rem;
    margin: 0 2px;
}
.cpb-segn-captcha__input {
    width: 72px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    background: #fff;
    flex-shrink: 0;
}
.cpb-segn-captcha__input:focus {
    outline: none;
    border-color: #1B4A8A;
    box-shadow: 0 0 0 3px rgba(27, 74, 138, .14);
}

/* ── Submit ── */
.cpb-segn-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}
.cpb-segn-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 28px;
    background: #c0392b;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, opacity .2s;
    letter-spacing: .01em;
}
.cpb-segn-submit:hover  { background: #a93226; }
.cpb-segn-submit:disabled { opacity: .6; cursor: wait; }
.cpb-segn-submit .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ── Non configurato ── */
.cpb-segn-unconfigured {
    display: flex;
    align-items: center;
    gap: 8px;
    font-style: italic;
    color: #6b7280;
    padding: 12px 0;
}
.cpb-segn-unconfigured .dashicons {
    color: #f59e0b;
    font-size: 20px;
    width: 20px;
    height: 20px;
}
