/* AI Travel Consultant tool. Fonts stay >= 15px per house rule. */

.wpic-travel { font-size: 16px; color: #1f2937; }

/* ---- Locked / upsell ---- */
.wpic-travel-locked { display: flex; justify-content: center; padding: 24px 0; }
.wpic-travel-lockcard {
    max-width: 560px; text-align: center; background: #fff;
    border: 1px solid #e5e9f2; border-radius: 16px; padding: 32px 28px;
    box-shadow: 0 8px 30px rgba(16, 40, 100, .06);
}
.wpic-travel-lockicon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; border-radius: 50%;
    background: #eef3ff; color: #0000bb; margin-bottom: 12px;
}
.wpic-travel-lockicon .wpic-icon { width: 28px; height: 28px; }
.wpic-travel-lockcard h2 { font-size: 22px; margin: 6px 0 10px; }
.wpic-travel-lockcard p { font-size: 16px; line-height: 1.55; color: #475569; margin: 0 0 12px; }
.wpic-travel-lockmeta { font-size: 15px; color: #334155; }

/* ---- Process switcher ---- */
.wpic-travel-switcher {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid #eef1f6;
}
.wpic-travel-tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; flex: 1; }
.wpic-travel-tab {
    display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
    background: #f8fafc; border: 1px solid #e5e9f2; border-radius: 999px;
    padding: 7px 14px; font-size: 15px; color: #334155; cursor: pointer;
    transition: border-color .15s, background .15s;
}
.wpic-travel-tab:hover { background: #eef3ff; border-color: #cbd9f5; }
.wpic-travel-tab.is-active { background: #eef3ff; border-color: #0000bb; color: #000080; font-weight: 600; }
.wpic-travel-tabname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.wpic-travel-tabdest {
    font-size: 15px; color: #64748b; background: #fff; border: 1px solid #e5e9f2;
    border-radius: 999px; padding: 1px 8px; white-space: nowrap;
}
.wpic-travel-tab.is-active .wpic-travel-tabdest { color: #0000bb; border-color: #cbd9f5; }
.wpic-travel-newbtn {
    flex: none; background: #0000bb; color: #fff; border: 0; border-radius: 999px;
    padding: 8px 16px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.wpic-travel-newbtn:hover { background: #0949c9; }
.wpic-travel-newbtn:disabled { opacity: .55; cursor: default; }

/* ---- Header ---- */
.wpic-travel-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.wpic-travel-title { display: flex; align-items: center; gap: 12px; }
.wpic-travel-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 12px;
    background: linear-gradient(135deg, #eef3ff, #dfe8ff); color: #0000bb; flex: none;
}
.wpic-travel-badge .wpic-icon { width: 24px; height: 24px; }
.wpic-travel-title h2 { font-size: 20px; margin: 0; line-height: 1.2; }
.wpic-travel-sub { font-size: 15px; color: #64748b; margin: 2px 0 0; }
.wpic-travel-stage {
    display: flex; align-items: center; gap: 8px;
    background: #eef3ff; border: 1px solid #d7e2fb; border-radius: 999px; padding: 7px 14px;
}
.wpic-travel-stage::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%; background: #0000bb; flex: none;
}
.wpic-travel-stage-label { font-size: 15px; color: #6478a8; }
.wpic-travel-stage strong { font-size: 15px; color: #000080; font-weight: 700; }

/* ---- Stage bar (connected stepper) ---- */
.wpic-travel-stages {
    display: flex; list-style: none; margin: 0 0 20px; padding: 6px 2px 2px;
    overflow-x: auto; scrollbar-width: thin;
    /* fade the scroll edges so an overflowing track reads as intentional,
       not clipped mid-word */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
}
.wpic-travel-stagestep {
    position: relative; display: flex; flex-direction: column; align-items: center;
    gap: 8px; flex: 1 1 96px; min-width: 96px; padding: 0 6px;
    font-size: 15px; color: #94a3b8; text-align: center;
}
/* connector running through the dot row to the next step */
.wpic-travel-stagestep::before {
    content: ''; position: absolute; top: 8px; left: 50%; width: 100%; height: 2px;
    background: #e2e8f0; z-index: 0;
}
.wpic-travel-stagestep:last-child::before { display: none; }
.wpic-travel-stagestep.is-done::before { background: #22c55e; }
.wpic-travel-stagedot {
    position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; border: 2px solid #cbd5e1; flex: none;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.wpic-travel-stagestep.is-done .wpic-travel-stagedot {
    background: #22c55e; border-color: #22c55e;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 11px; background-repeat: no-repeat; background-position: center;
}
.wpic-travel-stagestep.is-current .wpic-travel-stagedot {
    background: #0000bb; border-color: #0000bb; box-shadow: 0 0 0 4px rgba(0, 0, 187, .14);
}
.wpic-travel-stagename { line-height: 1.3; max-width: 100%; overflow-wrap: break-word; }
.wpic-travel-stagestep.is-done .wpic-travel-stagename { color: #334155; }
.wpic-travel-stagestep.is-current .wpic-travel-stagename { font-weight: 600; color: #0000bb; }

/* ---- Layout ---- */
.wpic-travel { min-width: 0; }
.wpic-travel-grid {
    display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start;
}
@media (max-width: 860px) {
    .wpic-travel-grid { grid-template-columns: 1fr; }
}

/* ---- Plan ---- */
.wpic-travel-plan, .wpic-travel-chat {
    /* min-width:0 so the 1fr chat track can shrink below its content's
       intrinsic width; without it a long message would blow out the grid and,
       through the dashboard's 1fr column, push the sidebar off-screen. */
    min-width: 0;
    background: #fff; border: 1px solid #e5e9f2; border-radius: 14px; padding: 18px;
    box-shadow: 0 1px 2px rgba(16, 40, 100, .04), 0 10px 28px rgba(16, 40, 100, .05);
}
/* Keep the plan in view while the chat runs long on wide screens. */
@media (min-width: 861px) {
    .wpic-travel-plan { position: sticky; top: 16px; }
}
.wpic-travel-panelhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wpic-travel-panelhead h3 { font-size: 17px; margin: 0; }
.wpic-travel-addbtn {
    background: #eef3ff; color: #0000bb; border: 0; border-radius: 8px;
    padding: 6px 10px; font-size: 15px; font-weight: 600; cursor: pointer;
    transition: background .15s;
}
.wpic-travel-addbtn:hover { background: #e0e9ff; }
.wpic-travel-addform { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.wpic-travel-addform input {
    width: 100%; font-size: 15px; padding: 8px 10px;
    border: 1px solid #d7deea; border-radius: 8px; transition: border-color .15s, box-shadow .15s;
}
.wpic-travel-addform input:focus {
    outline: none; border-color: #0000bb; box-shadow: 0 0 0 3px rgba(0, 0, 187, .12);
}
.wpic-travel-addactions { display: flex; gap: 8px; }

.wpic-travel-tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wpic-travel-task { display: flex; gap: 10px; padding: 10px; border: 1px solid #eef1f6; border-radius: 10px; background: #fbfcfe; }
.wpic-travel-task.is-overdue { border-color: #fecaca; background: #fff5f5; }
.wpic-travel-task.is-done { opacity: .62; }
.wpic-travel-task.is-done .wpic-travel-tasktitle { text-decoration: line-through; }
.wpic-travel-taskcheck { position: relative; flex: none; cursor: pointer; }
.wpic-travel-taskcheck input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.wpic-travel-checkbox {
    display: block; width: 22px; height: 22px; border-radius: 6px;
    border: 2px solid #cbd5e1; background: #fff; transition: all .15s;
}
.wpic-travel-taskcheck input:checked + .wpic-travel-checkbox {
    background: #22c55e; border-color: #22c55e;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 15px; background-repeat: no-repeat; background-position: center;
}
.wpic-travel-taskbody { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wpic-travel-tasktitle { font-size: 15px; font-weight: 600; color: #1f2937; }
.wpic-travel-taskdetail { font-size: 15px; color: #64748b; margin: 0; }
.wpic-travel-taskmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wpic-travel-taskdue { font-size: 15px; color: #64748b; }
.wpic-travel-task.is-overdue .wpic-travel-taskdue { color: #dc2626; font-weight: 600; }
.wpic-travel-tasklink { font-size: 15px; color: #0000bb; font-weight: 600; }
.wpic-travel-emptyplan {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 10px; padding: 22px 12px; margin: 4px 0;
    border: 1px dashed #dbe2ee; border-radius: 12px; background: #fbfcfe;
}
.wpic-travel-emptyicon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%; background: #eef3ff; color: #0000bb;
}
.wpic-travel-emptyicon .wpic-icon { width: 22px; height: 22px; }
.wpic-travel-emptyplan p { font-size: 15px; color: #64748b; margin: 0; line-height: 1.5; }

/* ---- Chat ---- */
.wpic-travel-chat { display: flex; flex-direction: column; min-height: 480px; }
.wpic-travel-messages { flex: 1; min-width: 0; overflow-y: auto; max-height: 520px; padding: 4px; display: flex; flex-direction: column; gap: 10px; }
.wpic-travel-msg { display: flex; gap: 10px; align-items: flex-start; }
.wpic-travel-msg.is-user { justify-content: flex-end; }
/* Consultant avatar, added via CSS so message rendering stays untouched. */
.wpic-travel-msg.is-ai::before {
    content: ''; flex: none; width: 30px; height: 30px; border-radius: 50%; margin-top: 1px;
    background: #eef3ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230000bb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v3M12 18v3M3 12h3M18 12h3M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1'/%3E%3C/svg%3E") center/17px no-repeat;
}
.wpic-travel-bubble {
    max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 16px; line-height: 1.5;
    overflow-wrap: anywhere;
}
.wpic-travel-msg.is-ai .wpic-travel-bubble { background: #f1f5fb; color: #1f2937; border-bottom-left-radius: 4px; }
.wpic-travel-msg.is-user .wpic-travel-bubble { background: #0000bb; color: #fff; border-bottom-right-radius: 4px; }
.wpic-travel-bubble p { margin: 0 0 8px; }
.wpic-travel-bubble p:last-child { margin-bottom: 0; }
.wpic-travel-bubble ul { margin: 6px 0; padding-left: 20px; }
.wpic-travel-bubble li { margin: 2px 0; }
.wpic-travel-bubble a { color: inherit; text-decoration: underline; }
.wpic-travel-msg.is-ai .wpic-travel-bubble a { color: #0000bb; }

.wpic-travel-typing { display: inline-flex; gap: 4px; align-items: center; }
.wpic-travel-typing span {
    width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; display: inline-block;
    animation: wpic-travel-blink 1.2s infinite both;
}
.wpic-travel-typing span:nth-child(2) { animation-delay: .2s; }
.wpic-travel-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes wpic-travel-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.wpic-travel-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 8px; }
.wpic-travel-chip {
    background: #f1f5fb; border: 1px solid #e2e8f0; border-radius: 999px;
    padding: 7px 12px; font-size: 15px; color: #334155; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.wpic-travel-chip:hover { background: #e6eefc; border-color: #cbd9f5; color: #000080; }
.wpic-travel-chip:focus-visible { outline: 2px solid #0000bb; outline-offset: 2px; }

.wpic-travel-composer { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid #eef1f6; padding-top: 12px; }
.wpic-travel-composer textarea {
    flex: 1; resize: none; font-size: 16px; line-height: 1.4; padding: 10px 12px;
    border: 1px solid #d7deea; border-radius: 12px; font-family: inherit; max-height: 160px;
    transition: border-color .15s, box-shadow .15s;
}
.wpic-travel-composer textarea:focus {
    outline: none; border-color: #0000bb; box-shadow: 0 0 0 3px rgba(0, 0, 187, .12);
}
.wpic-travel-sendbtn {
    flex: none; width: 44px; height: 44px; border-radius: 12px; border: 0;
    background: #0000bb; color: #fff; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s, transform .1s;
}
.wpic-travel-sendbtn:hover:not(:disabled) { background: #0949c9; }
.wpic-travel-sendbtn:active:not(:disabled) { transform: scale(.94); }
.wpic-travel-sendbtn:disabled { opacity: .55; cursor: default; }
.wpic-travel-sendbtn .wpic-icon { width: 20px; height: 20px; }
.wpic-travel-offline { font-size: 15px; color: #b45309; background: #fffbeb; border-radius: 8px; padding: 8px 10px; margin: 10px 0 0; }
