/* ──────────────────────────────────────
 * Landscape Concierge — Widget Styles
 * v1.0.0
 * ────────────────────────────────────── */

/* ── Container ── */
#landscape-concierge-widget {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    -webkit-font-smoothing: antialiased;
}

#landscape-concierge-widget.position-bottom-right {
    bottom: 20px;
    right: 20px;
}

#landscape-concierge-widget.position-bottom-left {
    bottom: 20px;
    left: 20px;
}

/* ── Chat Trigger (button + label) ── */
.lc-chat-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
}

.position-bottom-right .lc-chat-trigger {
    flex-direction: row-reverse;
}

.position-bottom-left .lc-chat-trigger {
    flex-direction: row;
}

/* ── Peek Label ── */
.lc-chat-label {
    background: #fff;
    color: #1f2937;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    animation: lcLabelSlide 0.5s ease 2s both;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.3s;
}

.lc-chat-label.lc-hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

@keyframes lcLabelSlide {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: translateX(0); }
}

.position-bottom-left .lc-chat-label {
    animation-name: lcLabelSlideLeft;
}

@keyframes lcLabelSlideLeft {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Chat Button ── */
.lc-chat-button {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.lc-chat-button:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}

/* ── Breathing Pulse Logo ── */
.lc-fab-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: lcBreathe 3s ease-in-out infinite;
}

.lc-fab-icon {
    font-size: 28px;
    line-height: 1;
    animation: lcBreathe 3s ease-in-out infinite;
}

.lc-breathe-paused {
    animation-play-state: paused;
}

@keyframes lcBreathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); }
}

/* Bounce in on load */
.lc-chat-button {
    animation: lcBounceIn 0.6s ease 0.5s both;
}

@keyframes lcBounceIn {
    0%   { transform: scale(0); opacity: 0; }
    50%  { transform: scale(1.15); }
    70%  { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

.lc-chat-button svg {
    width: 26px;
    height: 26px;
}

/* ── Header Logo ── */
.lc-header-logo {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px;
}

/* ── Chat Window ── */
.lc-chat-window {
    position: absolute;
    bottom: 76px;
    width: 380px;
    height: 560px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: lcSlideUp 0.3s ease;
}

.position-bottom-right .lc-chat-window {
    right: 0;
}

.position-bottom-left .lc-chat-window {
    left: 0;
}

@keyframes lcSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ── */
.lc-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    flex-shrink: 0;
}

.lc-chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lc-chat-header-icon {
    font-size: 24px;
    line-height: 1;
}

.lc-chat-header h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: inherit;
}

.lc-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 6px;
    opacity: 0.8;
    transition: opacity 0.2s;
    color: inherit;
}

.lc-close-btn:hover {
    opacity: 1;
}

/* ── Messages ── */
.lc-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lc-message {
    max-width: 85%;
    line-height: 1.5;
    font-size: 14px;
    word-wrap: break-word;
}

.lc-message p {
    margin: 0 0 6px;
}

.lc-message p:last-child {
    margin-bottom: 0;
}

.lc-bot-message {
    align-self: flex-start;
    background: #f3f4f6;
    color: #1f2937;
    border-radius: 16px 16px 16px 4px;
    padding: 12px 16px;
}

.lc-user-message {
    align-self: flex-end;
    background: var(--lc-primary, #2D5A27);
    color: #fff;
    border-radius: 16px 16px 4px 16px;
    padding: 12px 16px;
}

/* ── Action Buttons (from AI response) ── */
.lc-action-buttons {
    margin-top: 8px;
}

.lc-action-btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--lc-primary, #2D5A27);
    color: #fff !important;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin: 3px 4px 3px 0;
    transition: all 0.2s ease;
}

.lc-action-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* ── Typing Indicator ── */
.lc-typing {
    align-self: flex-start;
    display: flex;
    gap: 5px;
    padding: 12px 18px;
    background: #f3f4f6;
    border-radius: 16px 16px 16px 4px;
}

.lc-typing span {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: lcBounce 1.4s infinite ease-in-out;
}

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

@keyframes lcBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30%           { transform: translateY(-6px); }
}

/* ── Input Area ── */
.lc-chat-input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.lc-user-input {
    flex: 1;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    max-height: 100px;
    line-height: 1.4;
    outline: none;
    transition: border-color 0.2s;
    color: #1f2937;
    background: #fff;
}

.lc-user-input:focus {
    border-color: var(--lc-primary, #2D5A27);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.08);
}

.lc-user-input::placeholder {
    color: #9ca3af;
}

.lc-send-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.lc-send-btn svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.lc-send-arrow {
    font-size: 20px;
    line-height: 1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lc-send-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.lc-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ── Footer ── */
.lc-chat-footer {
    text-align: center;
    padding: 6px 14px 8px;
    border-top: 1px solid #f1f5f9;
}

.lc-chat-footer a {
    font-size: 10.5px;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.lc-chat-footer a:hover {
    color: #64748b;
}

/* ── Scrollbar ── */
.lc-chat-messages::-webkit-scrollbar {
    width: 5px;
}

.lc-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.lc-chat-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

/* ── Mobile Responsive ── */
@media (max-width: 440px) {
    .lc-chat-window {
        width: calc(100vw - 24px);
        height: calc(100vh - 100px);
        bottom: 72px;
        right: 0 !important;
        left: 0 !important;
        margin: 0 12px;
        border-radius: 14px;
    }
}

/* ══════════════════════════════════════
 * EMBEDDED / SHORTCODE MODE
 * [landscape_concierge]
 * ══════════════════════════════════════ */

.lc-embedded {
    width: 100%;
    max-width: 100%;
    height: 80vh;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ── Embedded Header ── */
.lc-embedded-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    flex-shrink: 0;
}

.lc-embedded-header .lc-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lc-embedded-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: inherit;
}

.lc-embedded-header .lc-header-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px;
}

.lc-embedded-header .lc-chat-header-icon {
    font-size: 28px;
    line-height: 1;
}

/* ── Embedded Messages ── */
.lc-embedded-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px 12px;
}

.lc-embedded-messages .lc-message {
    max-width: 70%;
    font-size: 15px;
}

.lc-embedded-messages .lc-bot-message {
    border-radius: 18px 18px 18px 4px;
    padding: 14px 20px;
}

.lc-embedded-messages .lc-user-message {
    border-radius: 18px 18px 4px 18px;
    padding: 14px 20px;
}

/* ── Embedded Input ── */
.lc-embedded-input {
    padding: 14px 20px;
    border-top: 1px solid #e5e7eb;
    gap: 10px;
}

.lc-embedded-input .lc-user-input {
    font-size: 15px;
    padding: 12px 16px;
    border-radius: 12px;
}

/* ── Embedded Footer ── */
.lc-embedded .lc-chat-footer {
    padding: 8px 20px 10px;
}

/* ── Embedded Mobile ── */
@media (max-width: 768px) {
    .lc-embedded {
        height: 75vh;
        min-height: 400px;
        border-radius: 12px;
    }

    .lc-embedded-messages .lc-message {
        max-width: 88%;
    }

    .lc-embedded-header {
        padding: 14px 18px;
    }

    .lc-embedded-messages {
        padding: 16px 16px 8px;
    }

    .lc-embedded-input {
        padding: 10px 14px;
    }
}
