/* ==========================================================================
   CLOUDÉ CONCIERGE | AI FRAGRANCE STYLIST
   ========================================================================== */

/* Container */
#cloude-concierge-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999999;
    font-family: 'Inter', sans-serif;
    pointer-events: none; /* Let clicks pass through empty space */
}

/* ==========================================================================
   FLOATING ORB
   ========================================================================== */
.concierge-orb {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.5s ease, filter 1.5s ease;
    pointer-events: none;
    background: transparent;
    border: none;
    box-shadow: none;
    opacity: 0;
    filter: blur(10px);
}

.concierge-orb.visible {
    opacity: 1;
    filter: blur(0px);
    pointer-events: auto;
}

.concierge-orb canvas {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 120px !important;
    height: 120px !important;
    border-radius: 50%;
    pointer-events: none;
}

.orb-core {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.orb-label {
    position: absolute;
    right: 80px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #8c6071;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(220, 180, 195, 0.2);
}

.concierge-orb:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 15px 40px rgba(220, 180, 195, 0.5),
        inset 0 0 25px rgba(255, 255, 255, 1);
    color: #c98595;
}

.concierge-orb:hover .orb-label {
    opacity: 1;
    transform: translateX(0);
}

.concierge-orb:hover .orb-core {
    transform: scale(1.1);
}

@keyframes orbPulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.2); opacity: 0.8; }
}

/* ==========================================================================
   AI PANEL (GLASSMORPHISM)
   ========================================================================== */
.concierge-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 120px);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.85), rgba(250, 240, 245, 0.65));
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    box-shadow: 
        0 30px 60px rgba(180, 140, 160, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 10;
}

.concierge-panel.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Animated Fog Background */
.panel-bg-fog {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(245, 225, 235, 0.6) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(230, 210, 240, 0.4) 0%, transparent 50%);
    animation: drift 20s infinite alternate ease-in-out;
}

@keyframes drift {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(-5%, 5%); }
}

/* Header */
.panel-header {
    position: relative;
    z-index: 2;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), transparent);
}

.header-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8e1e8, #e6c8d8);
    border: 2px solid #fff;
    box-shadow: 0 4px 10px rgba(220, 180, 195, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-avatar::after {
    content: 'C';
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    color: #a87b8d;
    font-style: italic;
}

.header-branding h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 600;
    color: #5a404b;
    margin: 0;
    line-height: 1.2;
}

.header-branding p {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9c7b88;
    margin: 4px 0 0 0;
}

.close-btn {
    background: rgba(255, 255, 255, 0.5);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8c6071;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: rotate(90deg);
}

/* Body / Chat Area */
.panel-body {
    position: relative;
    z-index: 2;
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: rgba(200, 160, 180, 0.5) transparent;
}

.panel-body::-webkit-scrollbar {
    width: 6px;
}
.panel-body::-webkit-scrollbar-thumb {
    background-color: rgba(200, 160, 180, 0.5);
    border-radius: 10px;
}

/* Welcome Screen */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
    animation: fadeInUp 0.8s ease forwards;
}

.welcome-screen.hidden {
    display: none;
}

.welcome-orb-container {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.welcome-orb-container canvas {
    position: absolute;
    width: 150px !important;
    height: 150px !important;
    pointer-events: none;
}

.welcome-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    color: #5a404b;
    margin-bottom: 8px;
    font-style: italic;
}

.welcome-subtitle {
    font-size: 14px;
    color: #8c6071;
    margin-bottom: 32px;
    font-weight: 300;
}

.concierge-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.concierge-option-btn {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.9);
    padding: 16px 20px;
    border-radius: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #6a4a58;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
    gap: 12px;
}

.concierge-option-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 180, 195, 0.15);
    color: #a87b8d;
}

/* Chat Interface */
.chat-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-area.hidden {
    display: none;
}

.chat-message {
    max-width: 85%;
    animation: fadeInUp 0.5s ease forwards;
}

.chat-message.ai {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
}

.message-bubble {
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
}

.chat-message.ai .message-bubble {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 1);
    color: #5a404b;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 15px rgba(220, 180, 195, 0.1);
}

.chat-message.user .message-bubble {
    background: linear-gradient(135deg, #e6c8d8, #dcb2c6);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(220, 180, 195, 0.2);
}

/* Product Card within Chat */
.chat-product-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 16px;
    padding: 16px;
    margin-top: 12px;
    display: flex;
    gap: 16px;
    box-shadow: 0 8px 25px rgba(220, 180, 195, 0.15);
}

.chat-product-img {
    width: 60px;
    height: 80px;
    object-fit: contain;
    background: rgba(245, 235, 240, 0.5);
    border-radius: 8px;
    padding: 8px;
}

.chat-product-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chat-product-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 600;
    color: #5a404b;
    margin: 0 0 4px 0;
}

.chat-product-notes {
    font-size: 12px;
    color: #8c6071;
    margin: 0 0 10px 0;
}

.chat-product-btn {
    background: #5a404b;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.chat-product-btn:hover {
    background: #c98595;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    align-items: center;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #c98595;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

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

@keyframes typing {
    0%, 100% { transform: translateY(0); opacity: 0.4; }
    50% { transform: translateY(-4px); opacity: 1; }
}

/* Footer / Input Area */
.panel-footer {
    position: relative;
    z-index: 2;
    padding: 16px 24px 24px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.8), transparent);
}

.panel-footer.hidden {
    display: none;
}

.input-wrapper {
    display: flex;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(220, 180, 195, 0.4);
    border-radius: 24px;
    padding: 4px;
    box-shadow: 0 4px 15px rgba(220, 180, 195, 0.1);
    transition: all 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: #c98595;
    box-shadow: 0 4px 20px rgba(220, 180, 195, 0.2);
}

#concierge-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #5a404b;
    outline: none;
}

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

#concierge-send {
    background: linear-gradient(135deg, #e6c8d8, #dcb2c6);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 2px;
}

#concierge-send:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #dcb2c6, #c98595);
}

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #cloude-concierge-container {
        bottom: 20px;
        right: 20px;
    }
    
    .concierge-panel {
        position: fixed;
        bottom: 0;
        right: 0;
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border: none;
        z-index: 10000;
        transform: translateY(100%);
        border-top-left-radius: 24px;
        border-top-right-radius: 24px;
    }
    
    .concierge-panel.active {
        transform: translateY(0);
    }
    
    .panel-header {
        padding: 20px;
    }
}

/* AI Scent Profiling Styles */
.chat-bubbles-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.chat-bubble-btn {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(200, 160, 180, 0.4);
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #5a404b;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.chat-bubble-btn:hover {
    background: #c98595;
    color: #fff;
    border-color: #c98595;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(201, 133, 149, 0.2);
}

.chat-analysis-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(245,235,240,0.8));
    border: 1px solid rgba(220,180,195,0.5);
    border-radius: 16px;
    padding: 20px;
    margin-top: 12px;
    box-shadow: 0 10px 30px rgba(180,140,160,0.15);
    position: relative;
    overflow: hidden;
}

.chat-analysis-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, #c98595, #e6c8d8, #a87b8d);
}

.analysis-title {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #a87b8d;
    text-transform: uppercase;
    margin: 0 0 16px 0;
    text-align: center;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(220,180,195,0.3);
    padding-bottom: 8px;
}

.analysis-label {
    font-size: 12px;
    color: #8c6071;
}

.analysis-value {
    font-size: 13px;
    font-weight: 500;
    color: #5a404b;
    text-align: right;
}

.analysis-aura {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed rgba(200,160,180,0.4);
}

.aura-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 600;
    font-style: italic;
    color: #5a404b;
    margin-top: 8px;
}

.analysis-family {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    background: rgba(255,255,255,0.5);
    padding: 10px 14px;
    border-radius: 12px;
}

.family-badge {
    background: #5a404b;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.luxury-reveal {
    animation: luxuryReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes luxuryReveal {
    0% { opacity: 0; transform: translateY(20px); filter: blur(5px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.reveal-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: linear-gradient(135deg, #e8a87c, #d4a017);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(212,160,23,0.3);
}

