/* liquid-pages-v1.css — stili pagine /ai-tutor e /newsletter (link diretto, liquid arancio)
   NB: caricato via <link> in index.html perché il bundle scoped Blazor non è linkato in questo deploy. */

/* ====================== /ai-tutor ====================== */
.ait-grad {
    background: linear-gradient(135deg, #E87C2A 10%, #F89B4D);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.ait-cta-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 28px;
}

.ait-disclosure {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 22px;
    font-size: 12px;
    color: rgba(250, 247, 240, 0.56);
    background: rgba(250, 247, 240, 0.04);
    border: 1px solid rgba(250, 247, 240, 0.08);
    padding: 7px 14px;
    border-radius: 999px;
}

.ait-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #E87C2A;
}

.ait-chat {
    max-width: 560px;
    margin: 0 auto;
    background: rgba(10, 14, 19, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(250, 247, 240, 0.08);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.ait-chat-hd {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(250, 247, 240, 0.08);
    background: linear-gradient(135deg, #E87C2A, #F89B4D);
}

.ait-av {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #1a0f06;
}

.ait-meta b {
    font-size: 14px;
    display: block;
    color: #1a0f06;
}

.ait-meta span {
    font-size: 11px;
    color: rgba(26, 15, 6, 0.7);
}

.ait-chat-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #0A0E13;
    max-height: 320px;
    overflow-y: auto;
}

.ait-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.ait-msg.bot {
    align-self: flex-start;
    background: rgba(250, 247, 240, 0.04);
    border: 1px solid rgba(250, 247, 240, 0.08);
    color: rgba(250, 247, 240, 0.78);
}

.ait-msg.me {
    align-self: flex-end;
    background: #E87C2A;
    color: #fff;
}

.ait-typing {
    display: flex;
    gap: 4px;
    align-items: center;
}

.ait-typing span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #E87C2A;
    opacity: 0.6;
    animation: ait-dot 1.2s infinite;
}

.ait-typing span:nth-child(2) { animation-delay: 0.2s; }
.ait-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ait-dot {
    0%, 80%, 100% { opacity: 0.2; }
    40% { opacity: 0.9; }
}

.ait-chat-in {
    display: flex;
    gap: 8px;
    padding: 14px 18px;
    border-top: 1px solid rgba(250, 247, 240, 0.08);
    background: #11161D;
}

.ait-input {
    flex: 1;
    min-width: 0;
}

.ait-send {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #E87C2A;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s, transform 0.2s;
}

.ait-send:hover:not(:disabled) {
    background: #F89B4D;
    transform: translateY(-1px);
}

.ait-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ait-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    max-width: 1000px;
    margin: 0 auto;
}

.ait-feat {
    background: rgba(10, 14, 19, 0.55);
    border: 1px solid rgba(250, 247, 240, 0.08);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.ait-feat-ic {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(232, 124, 42, 0.12);
    border: 1px solid rgba(232, 124, 42, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #F89B4D;
    margin-bottom: 14px;
}

.ait-feat h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    color: #FAF7F0;
    margin-bottom: 8px;
}

.ait-feat p {
    font-size: 13px;
    color: rgba(250, 247, 240, 0.56);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .ait-features { grid-template-columns: 1fr; }
}

/* ====== /ai-tutor — Maestro Annie-style split (v4.3.13) ====== */
.ait-chat--split {
    max-width: 860px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
}

.ait-chat-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ait-av--photo {
    object-fit: cover;
    object-position: center 18%;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.ait-privacy {
    margin: 0;
    padding: 10px 18px 14px;
    background: #11161D;
    font-size: 11.5px;
    color: rgba(250, 247, 240, 0.42);
}

.ait-privacy a { color: #F89B4D; text-decoration: none; }

.ait-voice-btn {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(250, 247, 240, 0.06);
    border: 1px solid rgba(250, 247, 240, 0.12);
    color: rgba(250, 247, 240, 0.6);
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.ait-voice-btn:hover { background: rgba(250, 247, 240, 0.12); color: #FAF7F0; }

/* Pannello destro: avatar animato + controlli */
.ait-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 24px 14px 16px;
    background: linear-gradient(160deg, #0d0a07 0%, #1a0e05 60%, #0d0a07 100%);
    border-left: 1px solid rgba(250, 247, 240, 0.06);
}

/* Media card foto (stile video Annie) */
.ait-media {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    background: #10131a;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    transition: box-shadow 0.3s;
}

.ait-media-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    display: block;
    
}

.ait-media.is-live {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.65), 0 6px 28px rgba(37, 99, 235, 0.35);
}

.ait-video-talking {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.ait-media.is-live .ait-video-talking { opacity: 1; }

.ait-wave {
    position: absolute;
    bottom: 10px;
    left: 12px;
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 18px;
    padding: 5px 8px;
    background: rgba(6, 8, 12, 0.68);
    border-radius: 9px;
    opacity: 0;
    transition: opacity 0.25s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.ait-media.is-live .ait-wave { opacity: 1; }

.ait-wave span {
    width: 3px;
    height: 100%;
    background: #4A9EFF;
    border-radius: 2px;
    transform-origin: bottom;
    animation: ait-wave-bounce 0.9s ease-in-out infinite;
}

.ait-wave span:nth-child(2) { animation-delay: 0.12s; }
.ait-wave span:nth-child(3) { animation-delay: 0.28s; }
.ait-wave span:nth-child(4) { animation-delay: 0.07s; }
.ait-wave span:nth-child(5) { animation-delay: 0.2s; }

@keyframes ait-kenburns {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.045) translateY(-4px); }
}

@keyframes ait-wave-bounce {
    0%, 100% { transform: scaleY(0.35); }
    50% { transform: scaleY(1); }
}

.ait-side-controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ait-book-btn {
    width: 100%;
    background: #2563EB;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.18s;
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.4);
}

.ait-book-btn:hover { background: #1d4ed8; }

.ait-side-icons {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.ait-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: rgba(250, 247, 240, 0.06);
    border: 1px solid rgba(250, 247, 240, 0.09);
    border-radius: 10px;
    padding: 7px 12px;
    color: rgba(250, 247, 240, 0.4);
    font-size: 10px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.18s, color 0.18s;
}

.ait-icon-btn.speaker-on {
    background: rgba(232, 124, 42, 0.12);
    border-color: rgba(232, 124, 42, 0.3);
    color: #E87C2A;
}

.ait-icon-btn.muted { color: rgba(250, 247, 240, 0.18); }

@keyframes ait-mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.5); }
    60% { box-shadow: 0 0 0 7px rgba(255, 59, 48, 0); }
}

.ait-icon-btn.mic-active,
.ait-voice-btn.mic-active {
    background: rgba(255, 59, 48, 0.15);
    border-color: rgba(255, 59, 48, 0.4);
    color: #FF3B30;
    animation: ait-mic-pulse 1.1s ease-in-out infinite;
}

@media (max-width: 860px) {
    .ait-chat--split { grid-template-columns: 1fr; }
    .ait-side {
        order: -1;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 18px;
        padding: 16px 18px;
        border-left: none;
        border-bottom: 1px solid rgba(250, 247, 240, 0.06);
    }
    .ait-media { width: 150px; height: 110px; flex: 0 0 auto; }
    .ait-side-controls { width: auto; }
    .ait-book-btn { width: auto; padding: 9px 20px; }
}

/* ====================== /newsletter ====================== */
.nl-card {
    max-width: 520px;
    margin: 0 auto;
    background: rgba(10, 14, 19, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(250, 247, 240, 0.08);
    border-radius: 22px;
    padding: 42px 38px;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.nl-ic {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #E87C2A, #F89B4D);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #1a0f06;
}

.nl-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #FAF7F0;
    margin-bottom: 10px;
}

.nl-card-text {
    color: rgba(250, 247, 240, 0.78);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 26px;
}

.nl-form {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.nl-input {
    flex: 1;
    min-width: 0;
}

.nl-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 12px;
    color: rgba(250, 247, 240, 0.56);
    text-align: left;
    line-height: 1.5;
    cursor: pointer;
}

.nl-consent input {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #E87C2A;
}

.nl-consent a {
    color: #F89B4D;
    text-decoration: underline;
}

.nl-error {
    margin-top: 14px;
    font-size: 13px;
    color: #F87171;
}

@media (max-width: 520px) {
    .nl-form { flex-direction: column; }
    .nl-card { padding: 32px 24px; }
}
