/* ========================================
   SCROLL TO BOTTOM FAB (Unread Indicator)
   ======================================== */
.unread-indicator {
    position: absolute;
    bottom: 80px;
    /* Above message box */
    right: 16px;
    width: 40px;
    height: 40px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 900;

    /* Animation Properties */
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.unread-indicator.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.unread-indicator.hide {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
}

/* Unread Indicator Arrow - Point Down */
.unread-indicator svg {
    width: 24px;
    height: 24px;
    color: #fff;
    transform: rotate(180deg);
    /* Flip to point down */
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.unread-indicator .unread-badge {
    /* position: absolute;
    top: -5px;
    left: -5px; */
    background: #667eea;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========================================
   ATTACHMENT ACTION SHEET
   ======================================== */
.action-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.action-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.action-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 20px 16px 40px;
    /* Extra bottom padding for safe area */
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);
}

.action-sheet-overlay.active .action-sheet {
    transform: translateY(0);
}

.action-sheet-header {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.action-sheet-handle {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 12px;
    transition: background 0.2s;
}

.action-item:active {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0.95);
}

.action-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-icon svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.action-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Colors for actions */
.action-gallery .action-icon {
    background: linear-gradient(135deg, #FF9F0A, #FFB340);
    /* Orange */
}

.action-file .action-icon {
    background: linear-gradient(135deg, #0A84FF, #5AC8FA);
    /* Blue */
}

.action-video .action-icon {
    background: linear-gradient(135deg, #30D158, #34E0A1);
    /* Green */
}

/* Specific Mobile Adjustments */
@media (max-width: 768px) {
    .unread-indicator {
        bottom: calc(70px + env(safe-area-inset-bottom));
        /* Adjust based on input height */
    }
}