/* AI call notes panel (welcome screen). All classes use the saai_ prefix. */

.saai_hide {
    display: none !important;
}

.saai_panel {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 150px;
    margin: 18px 0 22px;
    /*border-radius: 6px;*/
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #0f3a5c 0%, #175380 55%, #1c679e 100%);
    box-shadow: 0 4px 16px rgba(23, 83, 128, 0.28);
}

/* ---- left column: the sun toggle ---- */

.saai_left {
    flex: 0 0 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 8px 16px;
    background: rgba(0, 0, 0, 0.18);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.saai_sun {
    width: 46px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-size: 22px;
    line-height: 46px;
    opacity: 0.6;
    cursor: pointer;
    outline: none;
    transition: opacity 0.3s, color 0.3s, background 0.3s;
}

.saai_sun:hover {
    opacity: 0.85;
}

.saai_sun.saai_live {
    opacity: 1;
    color: #ffd54a;
    background: radial-gradient(circle, rgba(255, 213, 74, 0.35) 0%, rgba(255, 213, 74, 0) 70%);
    animation: saai_pulse 2s ease-in-out infinite;
}

.saai_sun.saai_live i {
    animation: saai_spin 12s linear infinite;
}

/* sun stays hidden (but keeps its space) until the sneak-peek button is clicked */
.saai_locked .saai_sun,
.saai_locked .saai_mode_label {
    visibility: hidden;
}

.saai_unlocked .saai_sun {
    animation: saai_fade 0.6s ease-out;
}

/* keep the live-mode pulse alongside the fade-in */
.saai_unlocked .saai_sun.saai_live {
    animation: saai_fade 0.6s ease-out, saai_pulse 2s ease-in-out infinite;
}

.saai_mode_label {
    margin-top: 6px;
    min-height: 14px;
    color: #ffd54a;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

@keyframes saai_pulse {
    0%, 100% { box-shadow: 0 0 6px 2px rgba(255, 213, 74, 0.45); }
    50% { box-shadow: 0 0 20px 8px rgba(255, 213, 74, 0.75); }
}

@keyframes saai_spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---- right column ---- */

.saai_right {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

.saai_shine {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;
}

/* sweep loops only while the sneak-peek button shows or a result is generating */
.saai_shine::before {
    display: none;
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 35%;
    height: 200%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(20deg);
    animation: saai_sweep 5s ease-in-out infinite;
}

.saai_sweeping .saai_shine::before {
    display: block;
}

@keyframes saai_sweep {
    0% { left: -60%; }
    55%, 100% { left: 130%; }
}

.saai_intro {
    position: relative;
    z-index: 1;
    text-align: center;
}

.saai_peek {
    padding: 13px 28px;
    border: 0;
    border-radius: 26px;
    background: #fff;
    color: #175380;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    outline: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.saai_peek:hover,
.saai_peek:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

.saai_peek i {
    margin-right: 6px;
    color: #006837;
}

/* four options */

.saai_options {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-gap: 10px;
}

.saai_opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    /*border-radius: 6px;*/
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    outline: none;
    opacity: 0;
    animation: saai_rise 0.45s ease-out forwards;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.saai_opt:nth-child(2) { animation-delay: 0.08s; }
.saai_opt:nth-child(3) { animation-delay: 0.16s; }
.saai_opt:nth-child(4) { animation-delay: 0.24s; }

.saai_opt i {
    flex: 0 0 auto;
    margin-bottom: 8px;
    font-size: 22px;
    color: #6fd36f;
}

.saai_opt:hover,
.saai_opt:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

.saai_opt.saai_active {
    background: #fff;
    color: #175380;
    border-color: #fff;
}

.saai_opt.saai_active i {
    color: #006837;
}

.saai_opt[disabled] {
    cursor: wait;
}

.saai_opt[disabled]:not(.saai_active) {
    opacity: 0.55 !important;
}

@keyframes saai_rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- results ---- */

.saai_result {
    position: relative;
    z-index: 1;
    margin-top: 16px;
    padding: 16px 18px;
    /*border-radius: 6px;*/
    background: #fff;
    color: #333;
    overflow: hidden;
    animation: saai_rise 0.3s ease-out;
}

.saai_loading {
    display: flex;
    align-items: center;
    color: #175380;
    font-weight: 700;
}

.saai_dots {
    display: inline-block;
    margin-right: 10px;
    white-space: nowrap;
}

.saai_dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 3px;
    border-radius: 50%;
    background: #175380;
    animation: saai_bounce 1.1s ease-in-out infinite;
}

.saai_dots span:nth-child(2) { animation-delay: 0.15s; background: #1c679e; }
.saai_dots span:nth-child(3) { animation-delay: 0.3s; background: #006837; }

@keyframes saai_bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
    40% { transform: translateY(-6px); opacity: 1; }
}

.saai_status {
    animation: saai_fade 0.4s ease-out;
}

@keyframes saai_fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.saai_output {
    position: relative;
    font-size: 14px;
    line-height: 1.55;
    word-wrap: break-word;
}

.saai_output h4 {
    margin: 14px 0 6px;
    /*color: #175380; -- colours from store */
    font-size: 15px;
    font-weight: 700;
}

.saai_output h4:first-child {
    margin-top: 0;
}

.saai_output p {
    margin: 0 0 8px;
}

.saai_output ul {
    margin: 0 0 8px;
    padding-left: 20px;
}

.saai_output li {
    margin-bottom: 4px;
}

.saai_ref {
    padding: 0 4px;
    border-radius: 3px;
    background: rgba(0, 104, 55, 0.09);
    color: #006837 !important;
    font-weight: 700;
    white-space: nowrap;
}

.saai_ref:hover,
.saai_ref:focus {
    background: #006837;
    color: #fff !important;
    text-decoration: none;
}

.saai_caret {
    display: inline-block;
    width: 7px;
    height: 15px;
    margin-left: 2px;
    vertical-align: text-bottom;
    background: #175380;
    animation: saai_blink 0.8s steps(2, start) infinite;
}

@keyframes saai_blink {
    to { visibility: hidden; }
}

.saai_error {
    color: #a94442;
    font-weight: 700;
}

.saai_error i {
    margin-right: 6px;
}

.saai_meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    color: #777;
    font-size: 12px;
}

.saai_meta .saai_cached {
    color: #006837;
    font-weight: 700;
}

.saai_regen {
    margin: 4px 0;
    padding: 4px 12px;
    border: 1px solid #175380;
    border-radius: 4px;
    background: #fff;
    color: #175380;
    font-weight: 700;
    outline: none;
    transition: background 0.2s, color 0.2s;
}

.saai_regen:hover,
.saai_regen:focus {
    background: #175380;
    color: #fff;
}

.saai_regen i {
    margin-right: 4px;
}

/* ---- plan cards ---- */

.saai_group_title {
    margin: 14px 0 8px;
    color: #175380;
    font-size: 15px;
    font-weight: 700;
}

.saai_group_title:first-child {
    margin-top: 0;
}

.saai_card {
    margin-bottom: 8px;
    padding: 10px 12px;
    border: 1px solid #e3e3e3;
    border-left: 4px solid #8a9ba8;
    border-radius: 4px;
    background: #fafcfd;
    opacity: 0;
    animation: saai_rise 0.35s ease-out forwards;
}

.saai_card.saai_p_high { border-left-color: #c9302c; }
.saai_card.saai_p_medium { border-left-color: #f0ad4e; }

.saai_card_head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 4px;
}

.saai_badge {
    display: inline-block;
    margin-right: 8px;
    padding: 2px 7px;
    border-radius: 3px;
    background: #8a9ba8;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.saai_p_high .saai_badge { background: #c9302c; }
.saai_p_medium .saai_badge { background: #e8960c; }

.saai_card_customer {
    margin-right: 8px;
    color: #175380;
    font-weight: 700;
}

.saai_card_due {
    margin-left: auto;
    color: #777;
    font-size: 12px;
}

.saai_card_action {
    font-weight: 700;
}

.saai_card_why {
    color: #555;
}

.saai_card_foot {
    margin-top: 4px;
    color: #777;
    font-size: 12px;
}

.saai_card_foot .saai_ref {
    margin-left: 4px;
}

/* ---- narrow screens / mobile ---- */

@media (max-width: 991px) {
    .saai_options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .saai_left {
        flex-basis: 62px;
        padding: 12px 4px;
    }

    .saai_sun {
        width: 38px;
        height: 38px;
        font-size: 18px;
        line-height: 38px;
    }

    .saai_right {
        padding: 14px 12px;
    }

    .saai_peek {
        padding: 11px 16px;
        font-size: 14px;
    }

    .saai_options {
        grid-template-columns: minmax(0, 1fr);
    }

    .saai_result {
        padding: 12px;
    }

    .saai_card_due {
        margin-left: 0;
        width: 100%;
    }
}
