/* Variabili tema AgriMag */
:root {
    --agri-forest: #1b4332;
    --agri-forest-dark: #0f2920;
    --agri-sage: #d8e2dc;
    --agri-sage-deep: #a8c0a9;
    --agri-cream: #fdfcf0;
    --agri-gold: #e9c46a;
    --agri-text: #1a1f1c;
    --agri-text-muted: #4a5548;
    --agri-radius-card: 12px;
    --agri-shadow-soft: 0 8px 32px rgba(27, 67, 50, 0.08);
    --agri-transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Box testo rilevante */
.agrivivo-rilevante-box {
    position: relative;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: var(--agri-radius-card);
    background-color: var(--agri-sage);
    border: 1px solid rgba(27, 67, 50, 0.08);
    box-shadow: var(--agri-shadow-soft);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    color: var(--agri-text);
}
.agrivivo-rilevante-offerta {
    background-color: rgba(233, 196, 106, 0.2);
    border-left: 4px solid var(--agri-gold);
}
.agrivivo-rilevante-prime-day {
    background: linear-gradient(135deg, #e8f4fd 0%, #d6ebfc 55%, #eef6ff 100%);
    border: 1px solid rgba(5, 120, 255, 0.22);
    border-left: 4px solid #0578ff;
    box-shadow: 0 8px 28px rgba(5, 120, 255, 0.1);
}
.agrivivo-rilevante-prime-day .agrivivo-rilevante-icon {
    color: #0578ff;
}
.agrivivo-rilevante-prime-day .agrivivo-rilevante-content a {
    color: #0578ff !important;
    font-weight: 600;
}
.agrivivo-rilevante-prime-day .agrivivo-rilevante-content a:hover {
    color: #0460cc !important;
}
.agrivivo-rilevante-icon {
    flex-shrink: 0;
    color: var(--agri-forest);
    margin-top: 0.25rem;
}
.agrivivo-rilevante-content {
    flex: 1;
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--agri-text);
}
.agrivivo-rilevante-content a {
    color: var(--agri-forest) !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.agrivivo-rilevante-content a:hover {
    color: var(--agri-forest-dark) !important;
}

/* Review Pro/Contro */
.agrivivo-review-container {
    margin: 2rem 0;
}
.agrivivo-review-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.agrivivo-review-pro,
.agrivivo-review-contro {
    flex: 1;
    min-width: 240px;
    padding: 1.5rem;
    border-radius: var(--agri-radius-card);
    border: 1px solid rgba(27, 67, 50, 0.08);
    box-shadow: var(--agri-shadow-soft);
}
.agrivivo-review-pro {
    background-color: rgba(216, 226, 220, 0.55);
}
.agrivivo-review-contro {
    background-color: rgba(253, 252, 240, 0.9);
    border-left: 4px solid #c45c5c;
}
.agrivivo-review-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.agrivivo-review-header svg {
    width: 24px;
    height: 24px;
}
.agrivivo-review-pro .agrivivo-review-header svg {
    color: var(--agri-forest);
}
.agrivivo-review-contro .agrivivo-review-header svg {
    color: #c45c5c;
}
.agrivivo-review-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--agri-forest);
}
.agrivivo-review-list {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--agri-text);
}
.agrivivo-review-voto {
    margin-top: 1.5rem;
    text-align: center;
    background: var(--agri-cream);
    padding: 1.5rem;
    border-radius: var(--agri-radius-card);
    border: 1px solid rgba(27, 67, 50, 0.08);
    box-shadow: var(--agri-shadow-soft);
}
.agrivivo-review-voto h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--agri-forest);
}
.agrivivo-voto-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background-color: var(--agri-forest);
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    border: 4px solid var(--agri-gold);
    box-shadow: 0 0 0 4px var(--agri-forest);
}

/* Banner Google — invariato */
.agrivivo-google-banner {
    max-width: 900px;
    margin: 2rem auto 1rem;
}
.agrivivo-google-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #000;
    color: #fff !important;
    padding: 1rem 1.5rem;
    border-radius: 0.875rem;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.agrivivo-google-link::before,
.agrivivo-google-link::after {
    display: none !important;
    content: none !important;
}
.agrivivo-google-link:hover,
.agrivivo-google-link:focus,
.agrivivo-google-link:focus-visible,
.agrivivo-google-link:visited {
    color: #fff !important;
    text-decoration: none !important;
    border-bottom: none !important;
    outline: none !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.agrivivo-google-link strong,
.agrivivo-google-link span {
    color: #fff !important;
    text-decoration: none !important;
}
.agrivivo-google-text {
    display: flex;
    flex-direction: column;
}
.agrivivo-google-text strong {
    font-size: 1.125rem;
    font-weight: 600;
}
.agrivivo-google-text span {
    font-size: 0.875rem;
    opacity: 0.85;
}
@media (max-width: 600px) {
    .agrivivo-google-link {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Banner newsletter Brevo */
.agrivivo-newsletter-admin-notice {
    padding: 0.75rem 1rem;
    margin: 1.5rem 0;
    border-left: 4px solid #d63638;
    background: #fcf0f1;
    color: #1a1f1c;
}
.agrivivo-newsletter-banner {
    --nl-forest: #1b4332;
    --nl-forest-dark: #0f2920;
    --nl-gold: #e9c46a;
    box-sizing: border-box;
    max-width: 820px;
    margin: 2rem auto;
    padding: 1.5rem 1.75rem;
    border-radius: 16px;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(233, 196, 106, 0.18) 0%, transparent 55%),
        linear-gradient(145deg, var(--nl-forest) 0%, var(--nl-forest-dark) 100%);
    border: 1px solid rgba(233, 196, 106, 0.22);
    box-shadow: 0 12px 40px rgba(15, 41, 32, 0.22);
    color: #fff;
    overflow: hidden;
}
.agrivivo-newsletter-banner *,
.agrivivo-newsletter-banner *::before,
.agrivivo-newsletter-banner *::after {
    box-sizing: border-box;
}
.agrivivo-newsletter-inner {
    position: relative;
}
.agrivivo-newsletter-content {
    position: relative;
    z-index: 1;
}
.agrivivo-newsletter-header {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    margin-bottom: 1.25rem;
}
.agrivivo-newsletter-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(233, 196, 106, 0.15);
    border: 1px solid rgba(233, 196, 106, 0.35);
    color: var(--nl-gold);
}
.agrivivo-newsletter-headings {
    flex: 1;
    min-width: 0;
}
.agrivivo-newsletter-banner .agrivivo-newsletter-title,
.agrivivo-newsletter-banner h3.agrivivo-newsletter-title {
    margin: 0 0 0.35rem !important;
    padding: 0 !important;
    border: none !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.01em;
    color: #ffffff !important;
    background: none !important;
}
.agrivivo-newsletter-banner .agrivivo-newsletter-subtitle {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
}
.agrivivo-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.agrivivo-newsletter-fields {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.4fr) auto;
    gap: 0.6rem;
    align-items: stretch;
}
.agrivivo-newsletter-input {
    width: 100%;
    margin: 0;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.97) !important;
    color: #1a1f1c !important;
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.agrivivo-newsletter-input::placeholder {
    color: #7a857c !important;
    opacity: 1;
}
.agrivivo-newsletter-input:focus {
    outline: none !important;
    border-color: var(--nl-gold) !important;
    box-shadow: 0 0 0 3px rgba(233, 196, 106, 0.35);
}
.agrivivo-newsletter-btn {
    margin: 0;
    padding: 0.8rem 1.35rem;
    border: none !important;
    border-radius: 10px !important;
    background: var(--nl-gold) !important;
    color: var(--nl-forest-dark) !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(233, 196, 106, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.agrivivo-newsletter-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(233, 196, 106, 0.45);
}
.agrivivo-newsletter-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}
.agrivivo-newsletter-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
}
.agrivivo-newsletter-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
}
.agrivivo-newsletter-checkbox {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin: 0.15rem 0 0;
    accent-color: var(--nl-gold);
    cursor: pointer;
}
.agrivivo-newsletter-consent a {
    color: var(--nl-gold) !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
}
.agrivivo-newsletter-consent a:hover {
    color: #fff !important;
}
.agrivivo-newsletter-message {
    margin: 0.5rem 0 0;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
}
.agrivivo-newsletter-message--success {
    background: rgba(168, 230, 163, 0.15);
    color: #c8f0c4;
}
.agrivivo-newsletter-message--error {
    background: rgba(255, 180, 180, 0.12);
    color: #ffc9c9;
}
.agrivivo-newsletter-note {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}
@media (max-width: 720px) {
    .agrivivo-newsletter-banner {
        padding: 1.25rem 1.25rem;
    }
    .agrivivo-newsletter-fields {
        grid-template-columns: 1fr;
    }
    .agrivivo-newsletter-btn {
        width: 100%;
    }
    .agrivivo-newsletter-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Popup sito */
.agrivivo-site-popup {
    --agrivivo-popup-btn-bg: #25D366;
    --agrivivo-popup-btn-color: #ffffff;
    --agrivivo-popup-title-color: #1a1f1c;
    --agrivivo-popup-subtitle-color: #4a5548;
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.agrivivo-site-popup[hidden] {
    display: none !important;
}
html.agrivivo-site-popup-open {
    overflow: hidden;
}
.agrivivo-site-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}
.agrivivo-site-popup__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 720px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}
.agrivivo-site-popup__close {
    position: absolute;
    top: 0.65rem;
    right: 0.75rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #3b82f6;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.agrivivo-site-popup__close:hover,
.agrivivo-site-popup__close:focus {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    outline: none;
}
.agrivivo-site-popup__body {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 2.25rem;
}
.agrivivo-site-popup__media {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
}
.agrivivo-site-popup__media img {
    display: block;
    width: 100%;
    max-width: 160px;
    height: auto;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.15));
}
.agrivivo-site-popup__content {
    flex: 1;
    min-width: 0;
    padding-right: 1.5rem;
}
.agrivivo-site-popup__title {
    margin: 0 0 0.65rem !important;
    padding: 0 !important;
    border: none !important;
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: var(--agrivivo-popup-title-color) !important;
    background: none !important;
}
.agrivivo-site-popup__subtitle {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--agrivivo-popup-subtitle-color);
}
.agrivivo-site-popup__cta {
    display: inline-block;
    width: 100%;
    max-width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: 4px;
    background: var(--agrivivo-popup-btn-bg) !important;
    color: var(--agrivivo-popup-btn-color) !important;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.agrivivo-site-popup__cta:hover,
.agrivivo-site-popup__cta:focus {
    color: var(--agrivivo-popup-btn-color) !important;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
    opacity: 0.95;
}
@media (max-width: 640px) {
    .agrivivo-site-popup__body {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem 1.25rem 1.75rem;
        text-align: left;
    }
    .agrivivo-site-popup__media {
        width: 120px;
    }
    .agrivivo-site-popup__content {
        padding-right: 0;
        width: 100%;
    }
    .agrivivo-site-popup__title {
        font-size: 1.15rem !important;
    }
}
