/* Bottom Navigation & Morphic Panels */

/* Animations */
@keyframes fadeInBg {
    0% {
        background: transparent;
    }

    to {
        background: rgba(0, 0, 0, .4);
    }
}

@keyframes morphicPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }

    100% {
        transform: scale(1);
    }
}

/* Morphic Overlay */
.morphic-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 10001;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Bottom Navigation Container */
.btmnav2 {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    background: transparent;
    z-index: 1000;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

/* Resist Container (The actual bar/panel) */
.btmnav2 .resist {
    position: relative;
    width: calc(100% - 40px);
    max-width: 500px;
    height: 65px;
    background: rgba(25, 25, 25, 0.6) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 10002;
    overflow: hidden;
}

/* Icons Row */
.resist-icons {
    display: flex;
    width: 100%;
    justify-content: space-around;
    align-items: center;
    transition: all 0.4s ease;
    padding: 0 10px;
}

.btmnav2 button {
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.btmnav2 button:active {
    transform: scale(0.9);
}

.btmnav2 img {
    width: 24px;
    height: 24px;
    display: block;
}

.btmnav2 .prof {
    width: 32px;
    height: 32px;
    border-radius: 100%;
    background-size: cover;
    background-position: center;
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.nav-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff3b30;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 15px;
    text-align: center;
}

/* Full Morphic Expansion State */
.resist.morphic-active {
    position: fixed !important;
    bottom: 10px !important;
    left: 10px !important;
    right: 10px !important;
    width: calc(100% - 20px) !important;
    max-width: 100% !important;
    height: 85vh !important;
    border-radius: 40px !important;
    background: rgba(15, 15, 15, 0.95) !important;
    padding: 0 !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    margin-bottom: 0 !important;
}

.resist.morphic-active .resist-icons {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

/* Morphic Panel Content */
.resist-morphic-panel {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.resist.morphic-active .resist-morphic-panel {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.morphic-handle-bar {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.morphic-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
    position: absolute;
    right: 20px;
}

.morphic-close-btn i {
    font-size: 20px;
    pointer-events: none;
}

.morphic-title {
    color: #fff;
    font-weight: 600;
    font-size: 16px;
}

.morphic-comments-list,
.morphic-friends-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

.morphic-input-area,
.morphic-share-area {
    padding: 15px 20px 30px 20px;
    background: rgba(20, 20, 20, 0.364);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.morphic-input-wrap {
    display: flex;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 25px;
    padding: 5px 5px 5px 15px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.morphic-input-wrap input {
    background: transparent;
    border: none;
    color: #fff;
    flex: 1;
    height: 40px;
    font-size: 15px;
    outline: none;
}

.morphic-input-wrap button {
    background: #007aff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Confirmation Area */
.morphic-confirm-area {
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.morphic-confirm-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.morphic-confirm-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.morphic-confirm-buttons {
    display: flex;
    gap: 15px;
    width: 100%;
}

.morphic-btn {
    flex: 1;
    padding: 15px;
    border-radius: 20px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.morphic-btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.morphic-btn-delete {
    background: #ff3b30;
    color: #fff;
}

/* AI Chat Styles */
.ai-msg.user {
    background: #007aff !important;
    padding: 12px 18px !important;
    border-radius: 20px 20px 5px 20px !important;
    align-self: flex-end !important;
    max-width: 85% !important;
    color: #fff !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2) !important;
}

.ai-dot-loading {
    display: inline-flex;
    gap: 4px;
}

.ai-dot-loading::after {
    content: "•";
    animation: ai-dot 1.5s infinite;
}

@keyframes ai-dot {

    0%,
    20% {
        content: "•";
    }

    40% {
        content: "••";
    }

    60%,
    100% {
        content: "•••";
    }
}