/* ========================================
   SocialHub - Global Message Form Layout
   Standardized input bars for Chat, Posts, and Comments
   ======================================== */

.sh-message-form {
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
    gap: 10px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    position: relative;
}

/* The jumping wrapper container */
.sh-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding-bottom 0.3s ease;
    overflow: visible !important; /* Ensure emoji picker and media previews aren't clipped */
}

.sh-message-form:focus-within .sh-input-wrapper {
    z-index: 1000; /* Elevate form above feed items when active to prevent picker going underneath */
    background: var(--bg-hover);
    border-color: var(--accent-cyan);
    padding-bottom: 50px; /* Space for buttons when expanded */
    transform: translateY(-12px); /* The "Jump Up" effect */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), var(--glow-cyan);
}

.sh-message-input {
    flex: 1;
    min-width: 0;
    background: transparent !important;
    border: none !important;
    padding: 14px 120px 14px 18px !important;
    color: var(--white);
    outline: none !important;
    font-size: 15px !important;
    height: 52px !important;
    resize: none;
    overflow-y: hidden;
    line-height: 1.5;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease !important;
}

.sh-message-input:focus {
    height: 120px !important;
    padding-right: 18px !important;
    overflow-y: auto !important;
}

.sh-message-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Corner Actions - tucked into the bottom right of the wrapper */
.sh-message-actions {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.sh-message-form:focus-within .sh-message-actions {
    opacity: 1;
}

/* Action Buttons (Icons) */
.sh-action-btn {
    width: 34px !important;
    height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px !important;
    transition: all 0.2s ease;
}

.sh-action-btn:hover {
    background: var(--bg-hover) !important;
    border-color: var(--accent-cyan) !important;
    color: var(--text-color) !important;
    transform: scale(1.08);
}

.sh-action-btn.send-btn {
    background: var(--primary-gradient);
    border: none !important;
    color: var(--white) !important;
}