/* Porter Concierge Chat Widget */

.concierge-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
}

.concierge-container *,
.concierge-container *::before,
.concierge-container *::after {
    box-sizing: border-box;
}

/* --- Toggle Button --- */

.concierge-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #780800;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 99998;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
}

.concierge-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.concierge-toggle svg {
    pointer-events: none;
}

.concierge-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e53e3e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* --- Tooltip --- */

.concierge-tooltip {
    position: fixed;
    bottom: 90px;
    right: 24px;
    background: #222;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    max-width: 250px;
    font-size: 13px;
    z-index: 99998;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: concierge-fadeIn 0.3s ease;
}

.concierge-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 24px;
    width: 12px;
    height: 12px;
    background: #222;
    transform: rotate(45deg);
}

.concierge-tooltip-text {
    margin-right: 8px;
}

.concierge-tooltip-close {
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    padding: 0 0 0 4px;
    line-height: 1;
    vertical-align: middle;
}

.concierge-tooltip-close:hover {
    color: #fff;
}

@keyframes concierge-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Chat Panel --- */

.concierge-panel {
    position: fixed;
    bottom: 88px;
    right: 24px;
    width: 380px;
    max-height: 520px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999;
    animation: concierge-slideUp 0.25s ease;
}

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

/* --- Header --- */

.concierge-header {
    background: #780800;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.concierge-header-title {
    font-weight: 600;
    font-size: 15px;
}

.concierge-minimize {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.concierge-minimize:hover {
    color: #fff;
}

/* --- Disclosure --- */

.concierge-disclosure {
    padding: 8px 14px;
    font-size: 11px;
    color: #888;
    font-style: italic;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

/* --- Messages --- */

.concierge-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 14px;
    min-height: 0;
}

.concierge-msg {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.concierge-msg-user {
    align-items: flex-end;
}

.concierge-msg-assistant {
    align-items: flex-start;
}

.concierge-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    max-width: 80%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.concierge-msg-user .concierge-bubble {
    background: #780800;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.concierge-msg-user .concierge-bubble a {
    color: #ffd;
    text-decoration: underline;
}

.concierge-msg-assistant .concierge-bubble {
    background: #f0f0f0;
    color: #222;
    border-bottom-left-radius: 4px;
}

.concierge-msg-assistant .concierge-bubble a {
    color: #780800;
    text-decoration: underline;
}

.concierge-time {
    font-size: 10px;
    color: #999;
    margin-top: 3px;
    padding: 0 4px;
}

/* --- Typing Indicator --- */

.concierge-typing {
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.concierge-typing span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: concierge-bounce 1.4s infinite;
}

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

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

@keyframes concierge-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
}

/* --- Input Form --- */

.concierge-input-form {
    display: flex;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

#concierge-input {
    flex: 1 1 auto;
    border: none;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
    background: #fff;
    min-width: 0;
}

#concierge-input::placeholder {
    color: #aaa;
}

.concierge-send {
    width: 44px;
    height: 44px;
    background: #780800;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.concierge-send:hover {
    background: #5a0600;
}

.concierge-send svg {
    pointer-events: none;
}

/* --- Mobile Responsive --- */

@media (max-width: 480px) {
    .concierge-panel {
        width: calc(100vw - 16px);
        right: 8px;
        bottom: 80px;
        max-height: 70vh;
        border-radius: 12px;
    }

    .concierge-toggle {
        right: 16px;
        bottom: 16px;
    }

    .concierge-tooltip {
        right: 16px;
        bottom: 82px;
        max-width: calc(100vw - 80px);
    }
}

/* --- Scrollbar --- */

.concierge-messages::-webkit-scrollbar {
    width: 5px;
}

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

.concierge-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.concierge-messages::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}
