/* Modern Premium Post Input Design - Completely Redesigned */

.post-input-container {
    margin: 0 0 1rem 0;
    width: 100%;
    max-width: 650px;
    animation: slideInDown 500ms cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    align-self: center;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-input-card {
    background: linear-gradient(145deg, rgba(30, 32, 34, 0.98), rgba(24, 26, 28, 0.98));
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 12px rgba(0, 0, 0, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    position: relative;
    backdrop-filter: blur(20px);
}

.post-input-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(76, 175, 80, 0.5), 
        rgba(76, 175, 80, 0.7),
        rgba(76, 175, 80, 0.5),
        transparent
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-input-card:hover,
.post-input-card.focused {
    border-color: rgba(76, 175, 80, 0.2);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(76, 175, 80, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.post-input-card:hover::before,
.post-input-card.focused::before {
    opacity: 1;
}

/* Post Input Header */
.post-input-header {
    padding: 1.25rem 1.5rem 0.75rem;
    position: relative;
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
}

.post-input-avatar {
    flex-shrink: 0;
}

.post-input-profile-pic {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(76, 175, 80, 0.25);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.25),
        0 1px 3px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(76, 175, 80, 0.08);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-input-profile-pic:hover {
    border-color: rgba(76, 175, 80, 0.5);
    transform: scale(1.05);
    box-shadow: 
        0 4px 16px rgba(76, 175, 80, 0.25),
        0 2px 6px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(76, 175, 80, 0.15);
}

.post-input-main {
    flex: 1;
    position: relative;
}

.post-input-textarea {
    width: 100%;
    min-height: 56px;
    max-height: 160px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
    font-family: inherit;
    resize: none;
    outline: none;
    padding: 0.875rem 0;
    margin: 0;
    line-height: 1.7;
    font-weight: 400;
    transition: all 0.3s ease;
    letter-spacing: 0.01em;
}

.post-input-textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.95rem;
    font-weight: 400;
}

.post-input-textarea:focus::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* Post Input Actions */
.post-input-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 0.5rem;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.01));
}

.post-input-options {
    display: flex;
    gap: 0.625rem;
}

.post-option-btn {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.05rem;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.post-option-btn:hover {
    background: rgba(76, 175, 80, 0.08);
    border-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.post-option-btn:active {
    transform: translateY(0) scale(0.96);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.post-input-submit {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.character-count {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

.character-count .char-current {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
}

.character-count.warning {
    background: rgba(255, 149, 0, 0.12);
    border-color: rgba(255, 149, 0, 0.3);
}

.character-count.warning .char-current {
    color: #ff9500;
}

.character-count.danger {
    background: rgba(255, 71, 87, 0.15);
    border-color: rgba(255, 71, 87, 0.4);
    animation: pulseWarning 1.5s ease-in-out infinite;
}

.character-count.danger .char-current {
    color: #ff4757;
    font-weight: 800;
}

@keyframes pulseWarning {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.4);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 0 4px rgba(255, 71, 87, 0);
    }
}

.post-submit-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 100px;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.post-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4);
}

.post-submit-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.post-submit-btn:disabled {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.post-submit-btn.cooldown-active {
    background: linear-gradient(135deg, #6c757d, #5a6268) !important;
    cursor: not-allowed !important;
    box-shadow: 0 4px 16px rgba(108, 117, 125, 0.3) !important;
}

/* Image Preview */
.image-preview-container {
    margin-top: 1.25rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: slideInPreview 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInPreview {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.image-preview {
    position: relative;
    display: inline-block;
    max-width: 240px;
    max-height: 240px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.image-preview:hover {
    transform: scale(1.03);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-preview-remove {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.image-preview-remove:hover {
    background: rgba(255, 59, 48, 0.95);
    border-color: rgba(255, 59, 48, 0.5);
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 4px 16px rgba(255, 59, 48, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .post-input-container {
        margin: 0 0 0.75rem 0;
        max-width: 100%;
    }
    
    .post-input-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .post-input-header {
        padding: 1.25rem 1rem 0.875rem;
        gap: 1rem;
    }
    
    .post-input-profile-pic {
        width: 48px;
        height: 48px;
        border-radius: 50%;
    }
    
    .post-input-textarea {
        font-size: 1rem;
        min-height: 60px;
    }
    
    .post-input-textarea::placeholder {
        font-size: 1rem;
    }
    
    .post-input-actions {
        padding: 1rem 1rem 1.25rem;
    }
    
    .post-option-btn {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
    
    .post-submit-btn {
        padding: 0.875rem 1.75rem;
        font-size: 0.95rem;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .post-input-header {
        padding: 1rem 0.875rem 0.75rem;
    }
    
    .post-input-profile-pic {
        width: 44px;
        height: 44px;
        border-radius: 50%;
    }
    
    .post-input-actions {
        padding: 0.875rem 0.875rem 1.15rem;
    }
    
    .post-option-btn {
        width: 44px;
        height: 44px;
    }
}
