/* Chat Interface Component Styles */
/* Prefixed with 'pulse-' to avoid conflicts with existing styles */

.pulse-iphone-container {
    width: 393px;
    height: 852px;
    background-color: #000;
    border-radius: 50px;
    padding: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    max-width: 100%;
}

/* Integration with landing page phone showcase - scale down entire component */
.phone-showcase .pulse-iphone-container {
    max-width: 100%;
    /* Let height be determined by aspect ratio */
    /* Scale and margins handled by page-specific CSS */
}

.pulse-iphone-screen {
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    border-radius: 40px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Status Bar Component */
.pulse-status-bar {
    background-color: transparent;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.pulse-time {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.4px;
    color: #000;
}

.pulse-status-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pulse-signal-bars {
    display: flex;
    gap: 3px;
    align-items: flex-end;
}

.pulse-signal-bar {
    width: 3px;
    background: #000;
    border-radius: 1px;
}

.pulse-signal-bar:nth-child(1) { height: 4px; }
.pulse-signal-bar:nth-child(2) { height: 6px; }
.pulse-signal-bar:nth-child(3) { height: 8px; }
.pulse-signal-bar:nth-child(4) { height: 10px; }

.pulse-wifi-icon {
    width: 15px;
    height: 11px;
    color: #000;
}

.pulse-battery {
    display: flex;
    align-items: center;
    gap: 1px;
}

.pulse-battery-body {
    width: 25px;
    height: 12px;
    border: 1.5px solid #000;
    border-radius: 3px;
    padding: 1px;
}

.pulse-battery-fill {
    width: 100%;
    height: 100%;
    background: #4CD964;
    border-radius: 1.5px;
}

.pulse-battery-tip {
    width: 1.5px;
    height: 4px;
    background: #000;
    border-radius: 0 1px 1px 0;
}

/* Chat Messages Component */
.pulse-chat-container {
    flex: 1;
    padding: 60px 16px 20px 16px;
    overflow-y: auto;
    min-height: 0; /* Allow flex shrinking */
}

.pulse-message {
    margin-bottom: 16px;
    animation: pulseMessageSlide 0.3s ease-out;
}

@keyframes pulseMessageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse-message-bubble {
    max-width: 80%;
    display: inline-block;
}

.pulse-user-message,
.user-message {
    text-align: right;
}

.pulse-user-message .pulse-message-bubble,
.user-message .pulse-message-bubble {
    background: #E8E8E8;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border-radius: 18px;
    padding: 10px 16px;
}

.pulse-message-text {
    color: #000;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.3px;
    margin: 0;
}

/* Input Component */
.pulse-input-container {
    padding: 12px 16px 8px;
    background: transparent;
    position: relative;
    z-index: 10;
}

.pulse-input-wrapper {
    position: relative;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08)) 
            drop-shadow(0 2px 4px rgba(0, 0, 0, 0.04));
}

.pulse-input-field {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    padding: 14px 52px 14px 20px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    font-size: 16px;
    color: #000;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.pulse-input-field:focus {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 1);
}

.pulse-input-field::placeholder {
    color: #8E8E93;
}

.pulse-send-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #007AFF;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pulse-send-button:hover {
    background: #0051D5;
    transform: translateY(-50%) scale(1.05);
}

.pulse-send-button:active {
    transform: translateY(-50%) scale(0.95);
}

.pulse-send-icon {
    width: 16px;
    height: 16px;
    fill: white;
    transform: rotate(-45deg);
}

/* Bottom Navigation Component */
.pulse-bottom-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    margin: 8px 16px 16px 16px;
    border-radius: 28px;
    padding: 8px 8px;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.08)) 
            drop-shadow(0 2px 8px rgba(0, 0, 0, 0.04));
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.pulse-nav-icons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: relative;
}

.pulse-nav-item {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 48px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    z-index: 2;
}

.pulse-nav-icon {
    width: 24px;
    height: 24px;
    fill: #8E8E93;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.pulse-nav-item.pulse-nav-active .pulse-nav-icon {
    fill: white;
    transform: scale(1.1);
}

.pulse-nav-item:not(.pulse-nav-active):hover .pulse-nav-icon {
    fill: #636366;
    transform: scale(1.05);
}

.pulse-nav-indicator {
    position: absolute;
    height: 48px;
    background: #000;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.pulse-nav-indicator.pulse-nav-pos-0 {
    left: 0;
    width: 33.33%;
}

.pulse-nav-indicator.pulse-nav-pos-1 {
    left: 33.33%;
    width: 33.33%;
}

.pulse-nav-indicator.pulse-nav-pos-2 {
    left: 66.66%;
    width: 33.33%;
}

.pulse-nav-indicator::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 23px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pulse-nav-indicator:hover::before {
    opacity: 1;
}

/* Home Indicator */
.pulse-home-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 134px;
    height: 5px;
    background: #000;
    border-radius: 100px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pulse-iphone-container {
        width: 320px;
        height: 693px;
    }
    
    .pulse-message-text {
        font-size: 14px;
    }
    
    .pulse-input-field {
        font-size: 14px;
        padding: 12px 48px 12px 16px;
    }
}

@media (max-width: 480px) {
    .pulse-iphone-container {
        width: 280px;
        height: 606px;
    }
    
    .pulse-status-bar {
        padding: 8px 16px;
    }
    
    .pulse-time {
        font-size: 15px;
    }
    
    .pulse-chat-container {
        padding: 12px;
    }
    
    .pulse-message-text {
        font-size: 13px;
    }
}

/* Disable navigation interaction in features section */
.section-features .pulse-nav-item {
    cursor: default;
}

.section-features .pulse-nav-item:not(.pulse-nav-active):hover .pulse-nav-icon {
    fill: #8E8E93;
    transform: none;
}

/* Typing indicator for interactive demo */
#typing-indicator {
    background: transparent !important;
    box-shadow: none !important;
}

#typing-indicator .typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    background: transparent;
    box-shadow: none;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8E8E93;
    animation: typingDots 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDots {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-10px);
    }
}